jeudi 6 janvier 2011

GWT DevMode everywhere

The DevMode appeared with GWT 2.0. With DevMode you can run in debug an GWT application. The immediate consequence is the dramatic increase of coding productivity.
It is very easy to use it thanks to the Eclipse Google plugin (Debug as Web application). The application run on embedded Jetty server and the DevMode mechanism is activated (communication between
client and server through a browser extension).

But when the application run in an external server, how to use DevMode ?
For example, a JBoss server that hosts an application based on Struts and improved by GWT components.
Well the solution is pretty simple, just start the GWT module in debug module via Eclipse Google plugin (as usual) and add the following parameter on each call of you pages : gwt.codesvr = 127.0.0.1:9997 (if your server is local).
That's it.

We can therefore use the GWT DevMode in differents technicals contexts : different JEE applications servers (whith JSP, JSF,GSP), but also PHP server PHP or ASP server.

Enjoy, and be productive.