Dear Armaz

All you needed to do was :

Cookie [] cookies = request.getCookies();
for (int i=0;i<cookies.length;i++){
        if (cookies[i].getName().equals("JSESSIONID")){
                cookies[i].setMaxAge(6*3600); // expire after 6 houre
                cookies[i].setValue(request.getSession().getId());
                response.addCookie(cookies[i]);
                break;
        }
}


Stop asking stupid questions :)

Regards,
Armaz 

> -----Original Message-----
> From: Armaz Mellati [mailto:[EMAIL PROTECTED] 
> Sent: 30. januar 2006 15:18
> To: [email protected]
> Subject: How to make sessions survive browser restart
> 
> Hi
> 
> 
> This may not be a Cocoon issue, however I take the chance.
> 
> I am using Cocoon-portal behind Tomcat, and I can't figure 
> out what to do to make Cocoon recognize users already logged 
> inn after they have restarted their browsers. 
> I know that in a cookie, you can set the maxAge with 
> setMaxAge(). But how can I do that for the JSESSIONID cookie 
> ??? Where is that cookie made ? 
> 
> Thanks for any tip in advance.
> 
> Regards,
> Armaz Mellati 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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