GWT Stack Integration Lab 1

GWT/Java Stack integration

Create a new Stack project

  1. Launch the Java Stack Starter.
  2. Once Stack Starter opens, specify a Project Name: of "StackGWT". Don't use spaces or special characters for your project name!
  3. Specify a Package Name: of "".
  4. For the Project Location use the location of the workspace that you use for the LDS Tech IDE. If you are not sure what this is, in the IDE go to File | Switch Workspace | Other.... The Workspace: value in the Workspace Launcher dialog should be the workspace directory that you are using.
  5. In Stack Starter, click on the Next button.
  6. Change your project properties for this lab
    1. Go to the Database property group
    2. Uncheck Use a database.
    3. Go to the View property group.
    4. Uncheck Use Spring MVC.
  7. Click on the Next button.
  8. At the top of the screen, click on the Build button.

Import your new Stack project into LDSTech IDE

  1. Go to the LDSTech IDE and select File | Import.
  2. Under the Maven tree item, select Existing Maven Projects.
  3. Select Next.
  4. To the right of the Root Directory: field, select the Browse... button and select your newly created "StackGWT" project.
  5. In the Projects: list you should see three sub-modules: qa, web, and deploy.
  6. Select Finish.

This will import the root Maven project, "StackGWT", and its three sub-modules as Eclipse projects.

Add the Maven Plugin to your Web pom.xml

  1. Open the pom.xml file in the StackGWT-web project.
  2. In the tabs on the bottom of the editor, select pom.xml to see the source of the file.
  3. Right after the artifactId element and before the dependencies element, paste the following:

In the dependencies section of the pom, add the following:


In the near future we will be adding a "GWT" checkbox to the Stack Starter that will make this section unnecessary.

Enable GWT on your Web project

  1. Right click on the StackGWT-web project and go to Google | Web Toolkit Settings.... If you do not have the Google option in the popup menu it is because you do not have the Google Plugin installed.
  2. Select the 'Use Google Web Toolkit checkbox and then select Ok.
  3. You need to tell the Google plug-in where your war directory is. For Maven projects, this is src/main/webapp. Go to Web Application under the Google option.
  4. Select the This project has a WAR directory checkbox and in the input box enter "src/main/webapp".

In the near future this will happen automatically for LDS Tech IDE users if the GWT Maven plug-in is found in the pom.xml file.

Add a GWT module to your project

  1. Create a GWT module in the package
  2. Create a GWT entry point.
  3. Create an HTML page that loads your GWT module named "index.html".
  4. Delete the file "/StackGWT-web/src/main/webapp/index.jsp".
  5. Place in your entry point class some code that will indicate whether or not your project is working. Something like Window.alert("Testing testing 1..2..3..");.
  6. Compile your module by right clicking on your project and go to Google | GWT Compile.

For a reminder on how to do these steps see GWT Intro Lab 1.

Start Tomcat

  1. Right click on StackGWT-web and select Run As | Run on Server.
  2. If a dialog box open, use the defaults and select Finish.
  3. Tomcat should start up. Look in the Console view for any exceptions. If you do see an exception, try to troubleshoot it and if need be, ask for help.
  4. A browser embedded in Eclipse should appear and run your GWT module.
This page was last modified on 12 July 2013, at 19:21.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.