Hi Jens

Yes i am sure, i got response code as 200 and the jsp from J2EE server
is also getting displayed,

sorry for typo  my application is in server 2 and J2EE application is
in server 1.

to overcome SOP only, we have setup the 2 servers in above format. so
that domain name and port are same, both servers end with

1. example.com

2. and also both servers have same port no. 8111

when i went through the sop policy in gwt documentation, i came across
below way of  loading images and javascript files from different
server. which i felt is similiar to our setup.

 part of documentation is pasted below:

"However, many organizations setup their deployment platform in such a
way that their main host HTML page is served up from http://mydomain.com/,
but any other resources such as images and JavaScript files are served
up from a separate static server under http://static.mydomain.com/. In
older versions of GWT, this configuration would not be possible as the
SOP prevented the GWT bootstrap process from allowing script from
files that were added from a different server to access the iframe in
the main host HTML page. As of GWT 1.5, the bootstrap model now
provides support for this kind of server configuration via the cross-
site linker (xs-linker).

When using the cross-site linker the compiler will still generate a
<module>.nocache.js that you will want to reference within your
index.html. The difference though, is that the <module>.nocache.js
produced by the cross-site linker will link in a cache.js file for
each of your permutations rather than a cache.html file.

To enable the cross-site linking simply add the following to your
<module>.gwt.xml and include a reference to your <module>.nocache.js
in your index.html as you normally would.

<add-linker name="xs"/>
"
according to this doesn't our setup overcome SOP.

Thanks
kumar

On Nov 12, 1:55 am, Jens <jens.nehlme...@gmail.com> wrote:
> Sure you got a 200 in IE? IE should also give some error if you try to make
> a request to a different domain/port. Also shouldn't your code snippet use
> factory-dev109.example.com if server 2 is the server you want to request?
>
> Well but in general you have three options to make cross domain requests:
>
> 1.) You have to use a reverse proxy so you can make requests to external
> servers without leaving the domain which serves the GWT application.
> 2.) Make a GWT request to server 1 (works because there is no SOP) and then
> let your server side code on server 1 do a request to server 2 using plain
> java.
> 3.) Use JsonpRequestBuilder. But this would require some rewrite of your
> "server 2" code as you now need to provide your data as JSON and also wrap
> this JSON data in a javascript callback function whose name is send by GWT
> to your server 2 via a GET parameter.
>
> -- J.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to