On Mon, Oct 22, 2012 at 4:14 PM, Michael Joyner <[email protected]> wrote:
> > > On Monday, October 22, 2012 4:07:52 PM UTC-4, Abraham Lin wrote: >> >> Use the >> ProxyPassReverseCookieDoma**in<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiedomain> >> and >> ProxyPassReverseCookieP**ath<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiepath> >> directives >> in your httpd config. Depending on how your virtual hosts are configured, >> you may want to make use of the environment variable interpolation. >> >> > Is there any reason these values cannot be set in the gwt RPC servlet? I > can set these in the a 'standard' servlet using the previously referenced > code, and I am at a loss as to why I can't set them for a GWT servlet > also... > > >> -Abraham >> > I injected a hackish fix. As this servlet is being deployed in multiple contexts, counting on the proxy stuff being set correctly is problematic. I prefer not counting on myself or other humans in making sure said proxy configs are set correctly everywhere. Here is my hackish fix for those curious: /* (non-Javadoc) * @see com.google.gwt.user.server.rpc.RemoteServiceServlet#processCall(java.lang.String) */ @Override public String processCall(String payload) throws SerializationException { fixSessionCookie(); return super.processCall(payload); } private void fixSessionCookie(){ String sessionId=""; sessionId=getThreadLocalRequest().getSession(true).getId(); Cookie sessionCookie=new Cookie("JSESSIONID", sessionId); sessionCookie.setComment("API Session Tracking Cookie"); sessionCookie.setDomain(getThreadLocalRequest().getServerName()); sessionCookie.setPath("/"); sessionCookie.setSecure(false); sessionCookie.setValue(sessionId); sessionCookie.setMaxAge(-1); System.err.println("session id: "+sessionCookie.getValue()); getThreadLocalResponse().addCookie(sessionCookie); } -- 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.
