0
votes

I currently have an eclipse GWT project which works well in dev mode and if I deploy the WAR to tomcat. So far it is all client side code that turns into javascript. I started the project by using google's eclipse web application project wizard with only GWT selected.

I want to add some RPCs (and other servlets) to run on the server. I am familiar with eclipse projects with GWT and AppEngine and I want to keep the same client, server, shared packages. Those projects seem to run both the java compiler for the server code and the GWT compiler for the GWT code. How can I set up Eclipse so that it mimicks this behavior but instead for servlets and GWT running on tomcat? I don't need it to deploy the war file (but working in dev mode would be a major plus).

1
Adding as a jar ,which consists of servlet class files ? - Suresh Atta
I do not understand, you are trying to run GWT on Tomcat instead on the embedded jetty? See here. - Andrea Boscolo

1 Answers

1
votes

You are required to compile your GWT app for Production Mode.

If you are using the Google Plugin for Eclipse, you can compile your application by clicking GWT Compile Project button enter image description here

You should see output something like

     [java] Compiling module com.mycompany.sample.Hello
     [java]    Compiling 5 permutations
     [java]       Permutation compile succeeded
     [java]    Linking into war
     [java]       Link succeeded
     [java]    Compilation succeeded -- 20.313s

build:

BUILD SUCCESSFUL Total time: 22 seconds

Once compilation completes successfully, directories will be created containing the JavaScript implementation of your project.

Read more: