1

We have a GWT application which draws some resources from a separate servlet via async javascript. In production this poses no problems as both the producer servlet and the consumer GWT app will reside on the same server, however for development I can't find a way to make this happen as we are head to head with the Same Origin Policy.

As a temporary solution I have the servlet running on Tomcat, and I compile and deploy the GWT app to that same Tomcat instance - this of course works, and it does allow me to attach Eclipse for debugging. However there is the slight problem of the 40 second or so build time for each modification.

We would like to be able to debug via GWT's hosted mode w/ OOPHM - can anybody see a way for us to do this?

Thanks all!

Richter
  • 627
  • 6
  • 13
  • For anybody else that may need this, Google [have it documented](http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_HostedModeNoServer). I think these docs are out of date (for GWT1.5) but the procedure was essentially the same. – Richter May 13 '11 at 10:43

3 Answers3

2

you could use the -noserver option of gwt dev mode, which lets you run your server code with any servlet container.

Daniel Kurka
  • 7,973
  • 2
  • 24
  • 43
1

Maybe you can deploy the producer servlet to Jetty.

http://www.enavigo.com/2008/08/29/deploying-a-web-application-to-jetty/

I think the Jetty home most reside somewhere in the Eclipse directories. A simple file search might help.

Good luck!

Alex
  • 32,506
  • 16
  • 106
  • 171
  • This sounds like it might do the trick. When Jetty is started as I start debugging my GWT app, does it use the same instance each time - I mean does it clean itself (deleting the servlet) before 'publishing'? Thanks for your reply - I'll look at this at work tomorrow. – Richter May 12 '11 at 20:49
  • 1
    I couldn't find where Jetty stores the files, so I started looking into Jetty with the intention of running it outside of Eclipse. However I came accross [this link](http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_HostedModeNoServer) from Google which explains what I was looking for! – Richter May 13 '11 at 10:42
1

If you need just a servlet, why not define it in web.xml and start dev mode as usual?

mabn
  • 2,473
  • 1
  • 26
  • 47