For setting up the GWT
in your local environment the following things are required.
- Download and install JDK 1.7. The GWT tutorial say you
can use 1.6 or higher. For me it did the app Engine did not work with 1.6
and required 1.7.
- Download Eclipse Kepler 4.3 or higher.
- Install the Google plugin in eclipse using the software
update feature in the Eclipse
- You can create a sample project after all the
installation is done. To create a Web Application, select File
> New > Web Application Project from the Eclipse menu.
- In the New Web Application Project wizard, enter a name for your project “MyWebApp” and a java package name, e.g., “com.mycompany.mywebapp”. If you installed the Google App Engine SDK, the wizard gives you the option to use App Engine as well. For now, uncheck this option and click Finish.
- The wizard creates a directory structure for the
project, including a src/ directory for Java source files, and a war/ directory
for compiled classes and other files for the application, libraries,
configuration files, static files such as images and CSS, and other data
files. The wizard also creates a servlet source file and two configuration
files.
- To run the Project go to Run As > Web Application. The Development mode
will give a URL on which the application is running. ( For the first time the browser will prompt you to add a GWT plugin. Install the plugin).
- You can double click the link to start on the default
browser. Or you can right click and click on Open With to choose the
browser which you want to use to open the link.
- If you get an error message as below then follow these
steps
o Right
click on your web project -> Run as -> Run configurations.
o Select
'Server' and 'GWT' tabs respectively and check on 'Automatically select an
unused port'
o Clear
Cache from your Chrome browser (do the same on Firefox if you are using
Firefox, remember the GWT plugin is not available on the latest Firefox
versions, 3-10 I believe).
o Run and
hopefully enjoy.
No comments:
Post a Comment