On 19 août, 20:31, jmich <jes...@allinsite.dk> wrote: > Hi, > > I've been trying to get gwt to work cross site for some time now, but > I'm stuck, so hope someone can help me out. > > This is what I did so far: > - added the xs linker to my gwt.xml > - made servlet for my service which overrides doOptions > - GWT compiled and deployed to my jetty server > - made a html page on my local machine, which includes the script > from the server > > In the jetty I see that the request comes in as a OPTIONS http method > and hits my doOptions method in the servlet. But I have little idea > about what I should put in the headers as response.
See http://www.w3.org/TR/cors You have to at least add the Access-Control-Allow-Origin response header. AFAICT, you'll have to also add this header in response to POST requests. It's probably more easily handled in a servlet filter than by extending the RemoteServiceServlet (and Jetty ships with such a filter which you just have to configure). -- 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-tool...@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.