deploy gwt app to tomcat


hope, I'm right here...
I have created a gwt application using Idea 6 Beta...
In the gwt shell all works fine.

How do I deploy this application to the tomcat?
I'm realy new to such topics, so a step by step solution would be the best...

greets from germany

Comment actions Permalink


The first thing you should make sure is that the GWT modules are created inside an IDEA web module. If that is the case, then you're nearly done. Each time you create a new remote service the GWT plugin will create matching servlet mappings in your web.xml.

To deploy the application into Tomcat, you still need to add the GWT-lib. The GWT-plugin adds gwt-user.jar automatically to the module's libs the first time you create a GWT module inside it. In the module settings of the web module on the page "Web module settings" you'll find that gwt-user.jar is not packaged into the deployed exploded directory or war. That's how it should be because gwt-user also contains the servlet api and Tomcat doesn't like it if you deploy your own version of the servlet api along with your application.

In GWT 1.1.0 beta there is also a gwt-servlet.jar. You have to manually add it as a lib to your web module. Now you can create a run configuration that will start Tomcat inside IDEA or you can mark "Create web module war file" on the "Java EE Build Settings" page in your module settings to create a war file that you can drop into any web container - e.g. Tomcat.


Comment actions Permalink

thank you...
this is exactly what i've looked for...

Comment actions Permalink

Hello Robert!

I have a similar problem. I have a project written on GWT in IDEA, and though the project works fine in hosted mode, I would like to deploy this project in Tomcat. You say in your previous post that GWT modules must be inside IDEA Web module. Right now my project has default GWT structure, which is:


There are currently no folders


What would be the best way to refactor or restructure my GWT project so I was able to run Tomcat server from IDEA? Or to move my modules to IDEA Web module.



Please sign in to leave a comment.