deploy gwt app to tomcat

Hello,

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

3 comments
Comment actions Permalink

Hi,

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.

Cheers,
Robert

0
Comment actions Permalink

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

0
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:

appName/
appName/client/
appName/public/
appName/server/

There are currently no folders

web/
web/WEB-INF/
web/index.jsp
web/WEB-INF/web.xml

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.

Regards,
Andrew

0

Please sign in to leave a comment.