How to set up eclipse with GWT and (regular servle

2019-05-10 05:19发布

问题:

Does anybody know how to set up a project in Eclipse with GWT and a jetty backend (regular web app, not app engine)? Or know of a good link (tried googling it, but no dice)

I've been trying to set up this all evening, but just ran into a number of strange problems, some seems to be bugs in WST/Jetty and the other is that the host page just doesn't work :-(

回答1:

There are three ways to run your own jetty server together with GWT.

If you run your own jetty server you have to invoke dev-mode in GWT with the -noserverparameter or for solution one you can use -server JettyLauncher

  1. Use your own JettyLauncher.class or use gwt-jetty.
  2. Use Jetty maven plugin to launch the jetty server (see here and here for infos)
  3. Use Jetty WTP plugin for eclipse to start a jetty server.

I personally used solution 3 (Jetty WTP plugin) to start a custom Jetty 7 server for my GWT project and it works fine.