Eclipse – Running GWT on tomcat in eclipse

eclipsegwtmaventomcat

I am trying to get a GWT Project running on a Tomcat 7 server in eclipse. I installed Tomcat and i can run other web application out of eclipse on Tomcat without a problem.

Now i generated a gwt maven project for eclipse with the following command and importet it as maven project to eclipse:
"mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin"

I can run this now as Web application (with the google plugin) and i can build a "war" with maven and deploy this with the Tomcat management console on the server. Both is working. But if i choose the option in eclipse "Run on server" and choose tomcat than just the html is loaded but not the application itself. See the screenshot: It doesn't find the "GWTModule.nocache.js".

Application not running

This file is available in the target folder. What do i have to change to tell tomcat to look in the correct directory?

project layout

Best Answer

Tomcat is not able to run GWT code in development mode. You can use Tomcat for server side code, but in this case you need to run GWT development mode with -noserver option (to prevent built-in Jetty instance from running). See this article for more details.