There has been few drastic changes made in GWT 1.6 . The most important one is the new project structure. GWT now uses a “war” directory for most public resource and server configuration files. For the total change list, visit this page.
My previous post “Getting Started With the GWT “ was fine for the previous version(1.5.*) of GWT. But, since things are not the same now, I am writing another tutorial for the new version of GWT. It is also applicable for GWT 1.7 or later.
- At first, download the latest build of GWT from here.
- Unzip it to any location in your Hard drive.
- Now, add the Google Plugin in your Eclipse IDE. You can follow my previous blog.
- Now choose File>New>Web Application Project. Or, you can click the “New Web Application Project” button from the newly added Google Toolbar.
- Give a project name and package structure. Leave other options as default.
- After finishing the “New Web Application” wizard, a default template GWT project would be created according to your given name.
- You’ll get a nice starting project after that. Moreover, you’ll get an RPC communication mechanism as default in this project. If you look at the project structure, you’ll find 3 files GreetingService.java, GreetingServiceAsync.java, GreetingServiceImpl.java in the project. This three files would be used if you need Server-Client communication.
- Now, if you want to develop a web app that will not need any server communication, you have to delete some stuffs from the project.
- Delete those three files. GreetingService.java and GreetingServiceAsync.java are located in your client package. And, GreetingServiceImpl.java is located in the server package.
- Open the “web.xml” file from the “war -> WEB-INF”.