views:

1526

answers:

2

I've got a Spring MVC application and I've decided that I'd like to try using GWT for the front end. I'd like to continue using MVC as I'll also be using Spring Security and some other springy stuff.

I'm aware of the GWT-SL project, and I guess I'll use it. The documentation is light on examples unfortunately.

What I'm wondering now is.... how do I reconfigure my project so that I can use GWT? I'm assuming that I'll lose the ability to run in hosted mode, and I suppose that's ok. Do I just add the GWT and GWT-SL jars, reconfigure my web.xml, and add a package to my project for the GWT code?

I'm using Eclipse 3.4. My existing project is standard web project.

A: 

You won't lose hosted mode. I don't know if you're using the internal server for that - I use -noserver so I can't help you there.

Other than that, I guess the documentation is quite clear. Have you hit any specific problems?

Robert Munteanu
+1  A: 

With the new version of the GWT plugin, you'd have all the benefits of the hosted mode browser without having to modify any options. The GWTHandler from the GWT-SL will take care of your rpc call mapping. However, you will have a problem with your existing domain objects structure. You will either have to put them in GWT's 'client' package, or mirror your existing domain objects to enable them to be compiled to javascript. I have been looking for a stable non-invasive framework for doing this, but have yet to find one. Gilead looks promising, but you will have to extend its classes on your domain.