Upload
pratik-bothra
View
222
Download
0
Embed Size (px)
Citation preview
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
1/10
Google AppEngine tutorialEclipse Indigo version
Hello world
1. Assumptions
Java and Eclipse already installed. I used installation of v 3.6 Helios for Java EE
Developers, but anything from 3.3 should be Ok.
If this assumption happens to be wrong visit http://www.eclipse.org/downloads/.
2. Google Plugin for Eclipse
Plugins for Eclipse could be installed from very logical place in the menu: Help->
http://www.eclipse.org/downloads/http://www.eclipse.org/downloads/7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
2/10
Install New Software
and [Add..] button
Location is specific for Eclipse version for Eclipse 3.6 (Helios) itshttp://dl.google.com/eclipse/plugin/3.6
for Eclipse 3.5 (Galileo) its
http://dl.google.com/eclipse/plugin/3.5
You got the idea and can guess url for Eclipse 3.4 (Ganymede) or where it will be for3.7 (Indigo) once Google will release it.
Next step = actually install it
http://dl.google.com/eclipse/plugin/3.6http://dl.google.com/eclipse/plugin/3.5http://dl.google.com/eclipse/plugin/3.6http://dl.google.com/eclipse/plugin/3.57/31/2019 Develop and Deploy Web App Using Google App Engine Demo
3/10
Google Plugin will add new toolbar
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
4/10
with New Web Application Project and Deploy App Engine Project buttons.
3. AppEngine account
Before creating New Web Application Project via [g+] button, or at least to
deploy your application to the Google cloud you need a AppEngine account at
http://appengine.google.com/ . In turn its requires gmail and ability to receive SMS(Google will text you a verification code).
There a loot of apps already created, so you might want to check availability of app.
id before hand
http://appengine.google.com/http://appengine.google.com/7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
5/10
As you see from Create an Application screen, Application Identifier will be partof the url, it also will show up on administration console of AppEngine
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
6/10
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
7/10
4. New Web Application Project
AppEngine New Web Application Project is not very different from regular web
project structure is really the same, just few pre-generated files and libraries specific
for AppEngine .It will create for you Servlet named after project, config files for JDO, Log4j, in web
artifacts it will create lib folder with bunch of jars, index.html and few more
configuration files:java logging, web.xml and appengine-web.xml
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
8/10
appengine-web.xml provides app. name (have to match Application Identifier from
step 3) and version. Version is cool way to have multiple instances of application tobe deployed simultaneously. So, you can test several versions and promote/rollback
any them with button click
BTW version doesnt have to be number just confirm to regex '^(?!-)[a-z\d\-]{1,100}$'
For example version b
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
9/10
5. Lets Run
There several ways to run:
Locally in Jetty just right-click in project explorer and select Run As->Web Application
- regular Eclipse way
it will start Jetty and show console where messages from Jetty and stdout of your app will
go.Unfortunately Jetty will not show up in the servers view, hence control ower it rather
limited html changes in project will be reflected immediately on localhost:8888, but
recompiled class wouldnt get updated by another RunAs, youll also have to stop Jetty.
6. Deploy to appspot.comAs easy as click on Deploy App Engine Project button
7/31/2019 Develop and Deploy Web App Using Google App Engine Demo
10/10
App Engine project settings allows you to change App ID and Version
Now Default (not latest!) version available at [appname] .appspot.com (app-eng-
hw.appspot.com in our case) and [version].[appname] .appspot.com particular version.