However, all I started to worry about was, bringing GWT to the major on-going project that was heavily using the Struts, Spring, JQuery etc. It almost looked to me as a potential set back for GWT development. Because GWT doesn't use a strict MVC pattern. There is no configuration file to specify the view, action, action-mapping etc. So It didn't seem to me right to go for GWT thinking to reduce javascript development time. It could potentially cost much more time to move away from the traditional MVC design. But whenever I started writing javascript, I couldn't think of the benefits of GWT. So I was seriously looking for a possible way to integrate the on-going Struts / Spring project with GWT. Thank God and thank Sumit Chandel, a support engineer @google, for his post "Developing Web 2.0 Apps with the Google Web Toolkit, Part 2". In that article he explained "Integrating GWT with other web application frameworks" (Struts and Spring). This article came to me at the time and I was amazed by the power of RootPanel and its get() method. Here is the small snippet from the article.
"After having explained this, it’s clear that the Struts MVC implementation and the aforementioned GWT MVC implementation don’t mesh very well, and it would be difficult and nonsensical to find a midway solution so that they would mesh. However, although integrating GWT and Struts infrastructures could prove to be an arduous task, integrating GWT modules into a web application based on the Struts framework is very simple.
This is possible due to the general purpose RootPanel.get("some_id").add() method call. Looking back to our FruitMart web application, we added the mainPanel to the RootPanel by calling RootPanel.get().add(mainPanel) in the entry point class’ onModuleLoad method without passing an argument to RootPanel.get(). This added the mainPanel to the “body” of the page, in essence making the GWT application become the page itself.
When we call RootPanel.get("some_id").add(mainPanel) with “some_id” as a parameter, we’re telling the GWT bootstrap procedure to look for an element with “some_id” in the page, and bind the GWT application to that element. What this means is that by defining an element with “some_id” in some arbitrary web page and including the GWT application bootstrap file, the GWT application will load up as a component on the page in the designated element."
I went with the way as was in the article. But I believe GWT needs some strong MVC patterns and may be a more standardized way is required to integrate existing web frameworks with GWT.