tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kief Morris <>
Subject Re: Q: Request Dispatching with Cookies Turn Off?
Date Wed, 31 Jan 2001 17:20:40 GMT
Nathan N. Vuong typed the following on 09:33 AM 1/31/2001 -0500
>Would like to know how to maintain single Session with 
>Cookies turn off on the browser with request dispatching:
>  1) request.getRequestDispatcher(URL)
>  2) getServletContext().getNamedDispatcher(servlet name)
>My first thought is to encodeURL() for 
> request.getRequestDispatcher(encodeURL(URL)), I'll try 
>this method.  But as for second method I'm stumped.

I haven't tested this, but I don't think you have to worry about the
session ID in either case. If you call forward() or include() your servlet
will be invoked before the request is finished, so Tomcat should have the 
session readily available. Have you tested code and found that the
session isn't available to the included or forwarded resource? Let
us know if you test it and I'm wrong.


View raw message