You can put all the Java files from your GWT project exactly where they were in the GWT project. I think your gwt.xml file may remain unchanged. In your web.xml file, you need to define the servlet (s) that you use in GWT, for example, if gwt.xml has <servlet path="/MyService" class="com.catfish.server.MyServiceImpl"/> , then web.xml is required:
<servlet> <servlet-name>MyService</servlet-name> <servlet-class>com.catfish.server.MyServiceImpl</servlet-class> </servlet>
and
<servlet-mapping> <servlet-name>MyService</servlet-name> <url-pattern>/module-path/MyService</url-pattern> </servlet-mapping>
Then use ant build script to compile GWT in WebContent / module-path. You can still start your GWT project using the standalone GWT browser, but if you want to run everything together, you compile the GWT project and then run Tomcat or Jetty or any other servlet engine that you use. And you will need to put the path to your generated GWT JavaScript application on any JSP or static page.
Brian deterling
source share