Using GWT Designer with Google App Engine (GAE)

I love Google’s products; although sometime judging by the lack of integration (of their own products) and poor documentation it feels like Google doesn’t really want anybody to use them (also Google please hire some decent designers to make things look pretty; note that programmers that know how to use photoshop are not designers).

One would think that using GWT Designer for creating an application to be deployed on Google App Engine ought to be very straightforward.  Unfortunately, that is not the case.  Bellow I will briefly describe what worked the best for me (and then what ought to have worked but did not).

What Works

By far the best way of developing GWT applications for deployment on GAE is by using eclipse (for people that like using UI’s).

Upgrading eclipse to the latest version that is supported by Google might be a good idea at this point (painless way of doing that is described here).

Install needed plugins: Google Plugin for Eclipse (GPE)  (I would think this would include all of Google’s plugins but it did not install all of them in my case), so you may need to install some of them individually GAE,  GWT,  GWT Designer

Create New Project; File/New/Project and select “Web Application Project”

Make sure to check the “Generate project sample code”; and also that both defaults for GWT and GAE are selected.

To make sure that things are working right click on the project and run it as web application.

Once you confirmed that project is running don’t forget to click on “terminate” button on eclipse’s console window  (otherwise you will get [ERROR] Unable to bind socket on port 9997 — is another session active? java.net.BindException: Address already in use).  Note sometime you may need to restart eclipse to free up the port.

Clear the Project

Now we want to clear the project; and to create one of our own.  Open the war/WEB-INF/<Project-Name>.html file and remove

    <h1>Web Application Starter Project</h1>

    <table align="center">
      <tr>
        <td colspan="2" style="font-weight:bold;">Please enter your name:</td>
      </tr>
      <tr>
        <td id="nameFieldContainer"></td>
        <td id="sendButtonContainer"></td>
      </tr>
      <tr>
        <td colspan="2" style="color:red;" id="errorLabelContainer"></td>
      </tr>
    </table>

Then in src/<Your-Package>.client.<Project-Name>.java replace quite long function  “public void onModuleLoad(){ …… }” with:

public void onModuleLoad() {
   RootPanel rootPanel = RootPanel.get();
}

Now You have a sparkling clean project.

Using GWT Designer

Displaying a blank page is probably not your goal; so now we can use GWT Designer to make things pretty.  To do that you need to open your java file, i.e. src/<Your-Package>.client.<Project-Name>.java  by right-click

 

And the select “Design Tab” at the bottom of the window (next to “Source”) and you will see the GWT Designer’s Palette.  Add some components and run your application again.  Everything should be working now  😉

GAE Deployment

After confirming that things are running fine locally, you can deploy your project to GAE.

 

 

What ought to Work but Does Not

You can easily create an application with GWT Designer.  However deploying to App Engine does not work; eclipse complains about absences of war directory and xml configuration files etc.

 

Also I have no idea why GWT Designer’s “design” tab is not available when the GWT file is open from inside of either “GWT Project” or “GAE Web Application Project”.

 

 

search keywords: eclipse google appengine GAE creating application with gwt designer on google appengine gwt web application starter project remove entry-point entrypoint entry point
Searched for gwt entry point class 11:16pm
Coding Basics – Google Web Toolkit – Google Code – google.com 11:16pmSearched for gae entry point 10:46pm
google app engine – How to deploy GWT… – stackoverflow.com 10:47pm
java – Questions about developing GAE… – stackoverflow.com 10:56pm
GWTの既存プロジェクトにModule,Entry… – hatena.ne.jp 10:57pm
Building a GAE+GWT application using… – wordpress.com 10:57pmGWT Designer User Guide – Google Web… – google.com 10:18pmSearched for gwt 10:18pmSearched for gwt entry point 10:18pm
3. Create your first GWT application – vogella.de 10:18pm
EntryPoint (Google Web Toolkit Javadoc) – googlecode.com 10:18pmSearched for google app engine entry-point 10:14pm
Step 1: Creating a GWT Project – Google… – google.com 10:14pm
GWT and Google App Engine – Google Web… – google.com – Viewed 2 times 10:14pmSearched for “Cannot set application ID (appengine-web.xml is missing)” 10:10pm
Issue 5308 – google-web-toolkit – Error… – google.com 10:10pm
Philbit: GWT tips and tricks – philbit.com 10:10pm
Cannot set application ID (appengine-web.xml… – coderanch.com 10:10pm
java – Migrating a Vaadin application… – stackoverflow.com 10:10pmSearched for Cannot set application ID (appengine-web.xml is missing)Searched for gwt “is not an App Engine project” 10:08pm
java – How to deploy Play! app to GAE… – stackoverflow.com 10:08pm
Searched for gwt is not an App Engine project 10:08pm
Searched for gwt google app engine 9:50pm
GWT and Google App Engine – Google Web… – google.com – Viewed 2 times 10:01pm
Searched for shimei 9:45pm
Searched for web application starter project remove 9:19pm
GWT Tutorial – vogella.de 9:19pm
How to remove “Web Application Starter… – google.com 9:19pm
Searched for web application starter project 9:17pm
Get Started with the GWT SDK – Google… – google.com 9:17pm
Searched for google app engine EntryPoint 9:01pm
Welcome to Google App Engine – google.com 9:00pm
Searched for google app engine billing 8:59pm
Searched for gwt designer google app engine 8:48pm
Google Web Toolkit Blog – blogspot.com 8:48pm
Tutorial Overview – Google Web Toolkit… – google.com 8:48pm
What’s New in GWT 2.4? – Google Web Toolkit… – google.com 8:48pm
using eclipse 3.6 and GWT and GWT Designer… – stackoverflow.com 8:48pm
Searched for gwt designer gpe 8:44pm
Google Web Toolkit Blog: GPE Support… – blogspot.com

About Neil Rubens

see http://ActiveIntelligence.org
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Using GWT Designer with Google App Engine (GAE)

  1. sebastien says:

    Here are the few issues I encountered to start using GWT with Eclipse.

    – When running an Eclipse project as Web application, a warning message might appear if there is a new SDK version available.
    The following link gives instructions to update an existing project (no issue if you start a new project with the newest SDK already installed):
    http://nrudnik.blogspot.com/2010/09/upgrade-google-app-engine-sdk-in.html
    note: check out the version numbers for eclipse and SDK

    – An error message “The project ‘myproject’ does not have any GWT SDK’s on its build path” displayed in Eclipse. Simple fix is to put GWT SDK library before Maven dependencies in Properties -> Java Build Path -> Order and Export.
    http://blog.inventivesoftware.com.au/2010/03/project-xxx-does-not-have-any-gwt-sdks.html

    – The most annoying issue was the message “Can’t create SWT Browser” when trying to use the GWT Design feature. It seems that there are different reasons and possible fixes but GWT team says this is an issue with Eclipse.
    There are different fixes in the links below:
    http://code.google.com/p/google-web-toolkit/issues/detail?id=6029
    http://sites.google.com/site/shespelt/development-info

    – Deployment fails if the version number has a “.” (e.g. “1.0”)
    http://stackoverflow.com/questions/5126026/deployment-fails-on-google-app-engine

Leave a Reply

Your email address will not be published. Required fields are marked *


*