How to debug a GWT app in hosted mode, which depends on an external servlet (Same Origin Policy)

407 views
Skip to first unread message

Rich

unread,
May 13, 2011, 4:44:42 AM5/13/11
to Google Web Toolkit
Hi,

We have a GWT application which draws some resources from a separate
servlet via 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?

Thankyou

David Chandler

unread,
May 14, 2011, 1:13:42 PM5/14/11
to google-we...@googlegroups.com
See http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#How_do_I_use_my_own_server_in_development_mode_instead_of_GWT's

HTH,
/dmc


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

Hilco Wijbenga

unread,
May 14, 2011, 3:54:08 PM5/14/11
to google-we...@googlegroups.com

Jetty makes setting up proxies very simple. I have different Jetty
instances running (one for the backend [port 8080] and one for GWT
[port 8888]). I also have a Jetty instance that proxies calls for port
18000 to either port 8080 (backend calls) or port 8888 (client calls).
The only difference at run time is that I invoke my GWT app with port
18000 instead of 8888. That is how I get around SOP.

Check out org.eclipse.jetty.servlets.ProxyServlet$Transparent.

Reply all
Reply to author
Forward
0 new messages