Now that the preparation is complete, you are ready to upload your GWT project to Google Apps engine. So what do you need to upload? You will need to upload only the contents of your war directory, which are as follows:
Go through the checklist below before uploading, to make sure you have the following files:
appengine-web.xml in MyWebApp/war/WEB-INF (make sure it uses the correct Application identifier).
web.xml in MyWebApp/war/WEB-INF
appengine-api.jar in MyWebApp/war/WEB-INF/lib
To upload the files, follow the steps below:
Step 1. Open the Linux terminal.
Step 2. You need to change the directory to your Ubuntu Desktop first, and then go inside the “bin” folder of appengine-java-sdk-1.3.7 directory.
codex-m@codex-m-desktop:~$ cd Desktop codex-m@codex-m-desktop:~/Desktop$ cd appengine-java-sdk-1.3.7 codex-m@codex-m-desktop:~/Desktop/appengine-java-sdk-1.3.7$ cd bin codex-m@codex-m-desktop:~/Desktop/appengine-java-sdk-1.3.7/bin$
The purpose of getting into the bin directory in appengine-java-sdk-1.3.7 is to execute the script appcfg.sh.
This script will let you upload files from the local server to Google Apps engine server. The actual syntax of the command is (take note of the dot before the appcfg.sh):
./appcfg.sh update [linux path to your war directory]
For example, if your Linux path to your war directory is : /home/codex-m/Desktop/gwt-2.0.4/MyWebApp/war then the command will be:
Press the enter key and it will start uploading the files. It will also show the progress of the uploading process:
Reading application configuration data... 09 24, 10 11:41:36 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed /home/codex-m/Desktop/gwt-2.0.4/MyWebApp/war/WEB-INF/appengine-web.xml 2010-09-24 23:41:36.842:INFO::Logging to STDERR via org.mortbay.log.StdErrLog 09 24, 10 11:41:40 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml INFO: Successfully processed /home/codex-m/Desktop/gwt-2.0.4/MyWebApp/war/WEB-INF/web.xml Beginning server interaction for codex-m... 0% Creating staging directory 5% Scanning for jsp files. 20% Scanning files on local disk. 25% Initiating update. Email: firstname.lastname@example.org Password for email@example.com: 28% Cloning 32 static files. 31% Cloning 44 application files. 40% Uploading 2 files. 52% Uploaded 1 files. 61% Uploaded 2 files. 68% Initializing precompilation... 90% Deploying new version. 95% Will check again in 1 seconds. 98% Will check again in 2 seconds. 99% Will check again in 4 seconds. 99% Will check again in 8 seconds. 99% Will check again in 16 seconds. 99% Will check again in 32 seconds. 99% Closing update: new version is ready to start serving. 99% Uploading index definitions.
Update completed successfully.
IMPORTANT: Be prepared to enter your Google account login information (in e-mail and password); it is needed to proceed with the uploading, as shown above. The uploading process might take some time, so you need to wait until it is successfully uploaded and you see the text “Update completed successfully.”