Friday, September 2, 2011

Re: Seperating the hosting of the client and server

Thanks, that's what I was looking for.

By adding the linker code in I was able to serve the HTML file the
Servlet server, and the static JS stuff from a completely different
domain. Not really so intuitive, but I understand that ultimately this
isn't a GWT issue but more like a browser issue.

On Sep 1, 12:18 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Thursday, September 1, 2011 6:07:23 PM UTC+2, Sander Smith wrote:
>
> > I'm trying to seperate the client side of my GWT app (the JS files)
> > from the server side by hosting them in different places. So the
> > static JS is atwww.host1.comand the Java web app stuff is at
> >www.host2.com.
> > To communicate, I simply pass the fully qualified URL (http://
> >www.host2.com/...) into setServiceEntryPoint().
>
> > Things aren't working, and I don't know why.
>
> "Same Origin Policy"
>
> > I've looked through the
> > documentation to see if this is allowed, and can't find anything that
> > says it's not. I have a gut feeling that this is violating some sort
> > of JS security issue, so I wanted to check before continuing.
>
> > Am I able to do what I want?
>
> If your HTML host page is on host1, then you won't be able to use GWT-RPC,
> RequestFactory or RequestBuilder to communicate with host2 (well, that's not
> entirely true, but if IE is to be supported, then consider it's simply not
> possible).
>
> You can however deploy your HTML host page on host2 and your JS at host1.
> You'll have to use the "xsiframe" linker for your code to be loaded in the
> web page though, but it's as easy as adding a line to your gwt.xml:
> <add-linker name="xsiframe" />

--
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.

No comments:

Post a Comment