On Aug 19, 11:31 am, jmich <[email protected]> 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. > So far I have done this: > > protected void doOptions(HttpServletRequest req, HttpServletResponse > res){ > Logger logger = Logger.getLogger(GlobalServiceServlet.class); > logger.log(Priority.INFO, "doOptions"); > res.addHeader("x-gwt-module-base", "http://localhost:8080/ > [myapp]/"); > } > > So I'm probably missing something, but I failed to find documentation > and examples on how to make this work. > > Hope someone can help
Jetty already comes with a filter to respond to options request - http://wiki.eclipse.org/Jetty/Feature/Cross_Origin_Filter You can read more about how we implemented cross site requests with IE as well which uses a different model at http://experienceswithgwt.blogspot.com/2010/04/gwt-and-cross-site-requests_28.html > > /Jmich -- 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.
