Re: How to debug a GWT app in hosted mode, which depends on an external servlet (Same Origin Policy)
On 13 May 2011 01:44, Rich <southy98@gmail.com> wrote:
> 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?
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.
--
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-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home