All,

Continuation.  

I've tested the following:
   RequestDispatcher rd = 
     request.getRequestDispatcher(response.encodeURL("/register.html"));
   rd.forward(request, response);
With Cookies turned on, works fine.  With Cookies turned off and with 
encodeURL, the receiving servlet still generated a new session id.

Bottomline it did not work.  As for the second method
   getServletContext().getNamedDispatcher(servlet name)
I really don't know how to proceed.

Regards,
Nathan Vuong
email: [EMAIL PROTECTED]

-----Original Message-----
From: Kief Morris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 12:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Q: Request Dispatching with Cookies Turn Off?


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.

Kief


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to