tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subir Sengupta <>
Subject How to use setRequestedSessionId
Date Mon, 03 Jun 2002 07:24:33 GMT

I'm not sure how to do this and was hoping for some pointers.  I have a
filter that intercepts the session in the request.  I then compare the
Session Id to another value and based on some calculations either accept or
reject the Session Id.  Here's the question.  How do I invalidate the
session and assign my own Session Id to the request?  Or have the request
reuse an existing session object.  setRequestedSessionId does not seem to be
available from the filter, so I don't know how to change the session
associated with the request.  I wrote my own version of the Standard
Manager, but the manager doesn't have access to the request, so I can't do
it there.

One of the uses for this is to not create a session everytime a particular
page is hit by a monitoring system (every 5 seconds).  Tomcat will create a
new session every time, which is wasteful.  If I could reuse the session in
this case, that would be ideal.

Would a HttpRequestWrapper work here and if so can anyone provide an
example.  I couldn't find any.

I'm using Tomcat 4.03 on Linux.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message