Launching GWT app in SuperDevMode on local Tomcat server

GWT project logo

This article is dedicated to all people who are still developing on internal Jetty server and do not know how to run their product on Apache Tomcat server. This guide is valid for Eclipse IDE (Currently: v4.5 MARS).

First of all, if you are not familiar with SuperDevMode and its prerequisites, please, check the official docs at http://www.gwtproject.org.

How does one start SuperDevMode on Apache Tomcat server? It’s easy like a pie! 🙂 Just follow these simple steps:

  1. I assume you already have Tomcat server installed on your local machine

  2. Click the right mouse button on your GWT project and then go to Run As -> Run Configurations…

  3. Then create a new launcher for Java Application in the open window

  4. In the tab menu choose Main and** **type your project name (i.e. MySuperProject) or select it with the Browse button. Type in the Main Class text box “com.google.gwt.dev.codeserver.CodeServer” without quotation marks

  5. Switch to the Arguments tab and set Program Arguments according to your project like this “-src src/ com.example.company.gwt.EntryPointClass -port 8900 First argument “-src src/” should point at your project source directory Second argument “com.example.company.gwt.EntryPointClass” should contain your GWT main entry package and class name Third argument “-port 8900” indicates your port selection for the SuperDevMode running instance

  6. In the VM Arguments section type whatever you want to be used as arguments by JVM. Normally, my argument settings would look like “-Xmx2048m -Xms1024m -XX:MaxPermSize=1024M

  7. Switch to the Classpath tab and select User Entries there. Then click on Add JARs… and go to your GWT SDK folder. Select one of jars named gwt-codeserver.jar

  8. Now click on apply button and run (as fast as u can…just kidding). Your SuperDevMode is now starting on localhost port 8900 (or whatever you selected in the arguments above)

  9. Once it started, navigate to http://localhost:8900/ and follow a step by step guide for setting bookmarks, which will appear automatically

  10. Now right click on your project and go to Run As… -> Run on Server to** **run your project on Tomcat server

  11. Finally, navigate to your Tomcat mount path with your main html page. This page already contains your GWT javascript http://localhost:8080/MySuperProject/MySuperProject/index.html.** **Click on previously bookmarked link to enable GWT Dev Mode ON

  12. A dialog window pops up with one compile button. After a while the page will be refreshed and you will be able to see your updated project

  13. Happy developing with SuperDevMode!

For additional information please visit SuperDevMode page at gwtproject.org

Contents