GWT and Spring

I am trying to use GWT and Spring and it does not appear that Spring is creating its beans and executing its lifecycle. Does a GWT Configuration within the Run/Debug Configurations execute a web container and process the web.xml including the servlet listeners that start up Spring? If it is supposed to and is not, what might I be doing wrong? If not, how is one supposed to use the hosted mode in IntelliJ? Thank you.

4 comments
Avatar
Nikolay Chashnikov
Comment actions Permalink

When you start your project in hosted mode GWT uses generated web.xml
file. So you should create Web facet, select it in settings of your GWT
facet, and run your project using some appserver run configuration (e.g.
Tomcat run configuration).

I am trying to use GWT and Spring and it does not appear that Spring is creating its beans and executing its lifecycle. Does a GWT Configuration within the Run/Debug Configurations execute a web container and process the web.xml including the servlet listeners that start up Spring? If it is supposed to and is not, what might I be doing wrong? If not, how is one supposed to use the hosted mode in IntelliJ? Thank you.



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

So creating a GWT Run/Debug configuration to utilize the GWT hosted execution environment and execute a Spring configuration is not possible? I have read a number of postings and Jira defects that seem to indicate that the "Shell parameters" field was added to the GWT configuration panel to support the use of Spring.

Unfortunately, the IDEA documentation has not been updated to show the possible values of that field, nor have I been able to find (yet) any references on the forum, Jira, or on the web.

Correct me if I am wrong, but are you suggesting that I create a Tomcat Server Run/Debug Configuration and deploy test in the web container? Thank you.

The whole point of GWT is to be able to debug your application as Java, not a web app and Javascript.

0
Comment actions Permalink

Correct me if I am wrong, but are you suggesting that
I create a Tomcat Server Run/Debug Configuration and
deploy test in the web container? Thank you.

The whole point of GWT is to be able to debug your
application as Java, not a web app and Javascript.


You have to use two configs, and run them at the same time: you run the server/Spring part of your app in a tomcat config, and you run the client part of it in the hosted mode browser, running it with the -NOSERVER (if I remember correctly) flag so that it does not try to start the embedded tomcat. It's slightly less convenient than having everything integrated, but it's not that complicate to set up and get used to (after all there is no way to tell the hosted mode to act as a "real" servlet container honoring web.xml and so on).

0
Comment actions Permalink

Sorry, it's been a while since the last time I used GWT support: if I remember correctly, the client part had to be started as a "normal" application (i.e. as if it was a standalone application), and not a GWT one, right because there was no way to specify the -NOSERVER flag. This used to be one of the annoying things of GWT support in IDEA 7, which was promising, but basically remained half-assed.

0

Please sign in to leave a comment.