BT

Using Spring with GWT and J2S

| by Rob Thornton Follow 0 Followers on Mar 06, 2007. Estimated reading time: 1 minute |

Google Web Toolkit and Java2Script Pacemaker (J2S) are two Java to JavaScript compilers that enable rich internet applications to be written in Java with JavaScript generated. Recent articles describe how to integrate these tools with Spring.

Gabi S. has written a recent article describing the integration of Spring with GWT. She walks through the steps in a tutorial.

To integrate this with Spring we only have to register our GWT servlet in our web.xml so we can simply use Spring’s ServletForwardingController  to call services by name. We also have to modify a bit our GWT client to reflect a path change we have to do. We add to the web.xml file the Spring’s DispatcherServlet mappings

Her article is a more thorough example of the one posted last year by George Georgovassilis.  His article covers creating a simple calculator application that deploys as a GWT application communicating with Spring via rcp.

The GWT Widget Library contains the GWTSpringController, an abstract Spring Controller which assumes the entire GWT-RPC functionality from within the Spring environment, allowing you to harness the full range of Spring services available to its controllers, such as proxying certain method invocations with database transactions or providing context beans to your service.

Another JavaScript compiler that integrates with Spring was recently covered by InfoQ.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT