You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Serlet Jean-Claude <je...@insee.fr> on 2006/09/18 11:11:46 UTC

Session and sendRedirect(url)


Hello
What i'm looking for is the answer to this question
Under Tomcat 5.5 _ Windows 2003 what happen to a session when there is a
sendRedirect(url) used ?
Is this session be invalidate ?
Thanks you

Jean-Claude 



Re: Session and sendRedirect(url)

Posted by David Smith <dn...@cornell.edu>.
Serlet Jean-Claude wrote:
> Hello
> What i'm looking for is the answer to this question
> Under Tomcat 5.5 _ Windows 2003 what happen to a session when there is a
> sendRedirect(url) used ?
> Is this session be invalidate ?
> Thanks you
>
> Jean-Claude 
>
>
>
>   
Session to my knowledge does not get invalidated on 
response.sendRedirect( url ).  If there is a problem, it might be you 
need to use response.encodeURL( url ) as you send the redirect -- as in 
response.sendRedirect( response.encodeURL( url ) ).  Basically if the 
client doesn't accept cookies or if tomcat doesn't know yet, it'll 
encode the jsessionid on the end of your url to maintain the session.

--David

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org