Thanks Jen,

Can you give me a example for the third option for proxy. I am new with Java
and GWT both. It will be very helpful if I have a example. I am using Apache
Tomcat webserver. Proxy will be more useful since I will need to interact
with few more servers in future.

Regards,
Vrushali

On Tue, Sep 6, 2011 at 9:47 PM, Jens <[email protected]> wrote:

> Where is your app (client side javascript) hosted?
>
> If the client code is not hosted on localhost:8080 then you have the Same
> Origin Policy problem. RequestBuilder or better JavaScript can only do
> requests to URLs that belong to the same domain and port under which the
> JavaScript/HTML Page is accessible. This is implemented in all browsers for
> security reasons.
>
> Your options are:
> - Deploy everything (including client side code) to your external server
> and start the app there. That way everything will be served from
> localhost:8080.
> - use GWT's JSONPRequestBuilder which does a nifty trick to make cross
> domain/port requests work (you also have to update the remote servlets!)
> - install a webserver that supports reverse proxy (Apache, nginx, etc.) and
> redirect/proxy the remote requests. For example if you request
> http://localhost/remote/request you can proxy the request to a different
> host like http://localhost:8080/app<request_uri>. Thats what I do because
> it matches my production setup.
>
> -- J.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/01YeGjAItRsJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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

Reply via email to