Google Apps Engine Get Started

Install Google Apps Engine development environment

1.       Install eclipse

2.       Go to http://code.google.com/eclipse/docs/getting_started.html to check update site URL according to your version of Eclipse.

3.       Run eclipse, select menu help > install new software > Add new site by using above google plugin site URL

4.       Select all checkboxes, and then follow the wizard to install google plugin.

5.       restart eclipse

 

Create first Google App

1.       In eclipse, Select the File menu > New > Web Application Project

2.       The "Create a Web Application Project" wizard opens. For "Project name " enter " Guestbook ", For "Package" enter " guestbook ". If you're not using Google Web Toolkit, uncheck "Use Google Web Toolkit" Verify that "Use Google App Engine" is checked

3.       Click Finish

 

The wizard creates a directory structure for the project like this

Guestbook/
  
src/
    
guestbook/
      
server/
        
GuestbookServlet.java
    
META-INF/
      
jdoconfig.xml
    
log4j.properties
    
logging.properties
  
war/
    
WEB-INF/
      
lib/
        
...App Engine JARs...

      
appengine-web.xml
      
web.xml
    
index.html

 

Run the project in local simulated environment web server

1.       select menu Run > Debug/Run As > Web Application

2.       If the server starts successfully, the server displays several messages, including a message similar to the following, in the Console

The server is running at http://localhost:8888/

3.       open a web browser, try to access http://localhost:8888/guestbook

4.       To stop the server, switch to “Debug” perspective, in Debug panel, click Stop button

 

Note : 如果你修改 java files, jsp, static files and appengine-web.xml ,则不需要 restart server 。但如果你修改了 web.xml ,则需要 restart server.

 

Upload app to Google Apps Engine

1.       Go to https://appengine.google.com , and use your gmail account and pwd to login

2.       Click “Create an Application ” button (one gmail account can create 10 apps)

3.       Input “Application Identifier ” (e.g. “tomsonguestbook ”), and “Application Title ” (e.g. “Guest Book ”). If you are creating your first app, you need to input your mobile number (e.g. +852 6309XXXX), and a code is sent to you by SMS.

4.       Click “Create Application ” button

5.       Back to Eclipse, edit the appengine-web.xml file of your project, and change the <application>...</application> element to contain the “Application Titlevalue in Step 3.

6.       In eclipse tool bar, click the button “Deploy App Engine Project ” (the icon is a plane )

7.       In the popup window, input your administrator account username (your email address) and password, click “Deploy ” button.

8.       Test your application on App Engine by visiting its URL:

http://<your application ID>.appspot.com/guestbook

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值