> Andras Balogh wrote:
>
>         Hello All,
>
> Sorry if this question was asked already.
> I have used session tracking to maintane some info of the user.
> (This question is valid if cookies are used for session tracking).
> The deafult session timeout is 30 mins or the session will be invalidated
> if the browser is closed.

The session is not invalidated when the browser is closed. It's still
available in the servlet engine's (container's) memory. But the session
ID cookie is usually kept only in browser memory so when you close the
browser you usually loose the cookie and can not get access to the session
data on the server when you start a new browser process.

> Now i have tought that it would be better that the session won't be invalidated
> if the browser is closed.
> So i want to achive that a session to have a lifetime of 30 mins no matter if
> the borwser is closed or not.
> I have tought to MANUALLY set a cookie that expires after 30 mins.
> Now my question is:
>     - How can i set manually the cookie wich was set originally by the 'session
> tracker' ? Or what should i do to resolve this problem with minimal changes
> (not to do session tracking myself) ?

Most servlet engines (containers, I guess I better start using the new term ;-)
let you set the life time of the session ID cookie. It's commonly a property
named session.cookie.maxage in a config file called session.properties, but
you should look at the documentation for your servlet container to find out
the details for your specific container.

>    - How can i treate correctly the time (30 min) for diferent timezones?

All date information in HTTP is expressed as GMT so the time zone of the
client and server don't matter. If the client clock is off compared to the
server there may be a problem though, but according to a recent message on
this list the client should sync based on the Date header the server sends
back (I have not verified if this is in the HTTP spec or not).

--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to