I'm modifying the response by appending a session cookie whose maxAge
has been configured to a positive value. I'm writing it as a Filter
because 1) Eric suggested that (well, he suggested a Valve, but from
my limited understanding, it seems like a Filter does the same thing
and is not
I would like to have a session ID cookie that has a max age of 48
hours, so that if a user comes back to my site after closing their
browser, they will still have the same session on the server. How can
I configure Tomcat to set the max age of the session ID cookie to
anything other than
Well, you can set the max age on a cookie to something 0, which
means that it will persist for that amount of time, even if the
user's browser window is closed. I'm just trying to figure out if
there is a way to tell Tomcat to set that property on the cookies
that it creates to store the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
Jesse Barnum wrote:
Well, you can set the max age on a cookie to something 0, which means
that it will persist for that amount of time, even if the user's browser
window is closed. I'm just trying to figure out if there is a way to
tell
You will probably have to write a valve for this. I had to write one
to set the session cookie's domain so that it's a site wide domain.
I posted the code to this mailing list a while back. If you do a
search you should be able to find it, if not let me know I'll see if I
can get a hold of it.
Eric, I found your code, so I'll try to modify it for my needs. I've
never written a valve before, so wish me luck!
Chris, this is an internal application which will not be accessed by
more than 7 people, so the server session timeout will be 48 hours.
The idea is for the application to be
Eric, that worked - your code was very helpful, thanks. I wound up
doing it as a Filter instead of a Valve, so that it would not be tied
to Tomcat.
Here is the code in case anybody else would find it useful:
--Jesse Barnum, President, 360Works
http://www.360works.com
(770) 234-9293
Subject: [SOLVED] Re: How do I set maxage on the JSESSIONID cookie?
Eric, that worked - your code was very helpful, thanks. I wound up
doing it as a Filter instead of a Valve, so that it would not be tied
to Tomcat.
Here is the code in case anybody else would find it useful:
--Jesse Barnum