[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - request.isRequestedSessionIdValid does not work

kenzhang do-not-reply at jboss.com
Mon Oct 20 02:41:05 EDT 2008

Hi all,

During my work, I use request.isRequestedSessionIdValid to check whether the session is valid before I invalidate one session, the code is like below:
if (request.isRequestedSessionIdValid()){
  |           session.invalidate();
  |       }

However, those codes do not always work correctly. Sometimes, there will be IllegalStateException caused by the 'session.invalidate', the stack trace is like below:
anonymous wrote : java.lang.IllegalStateException: invalidate: Session already invalidated
  | at org.jboss.web.tomcat.service.session.ClusteredSession.invalidate(ClusteredSession.java:669)
  | at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
  | .

Can anybody tell me why?
Thanks in advance.

BTW: while doing the search across the forum, I find one post which covered the similar issue:
but unfortunately, there is no reply for that post.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183120#4183120

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183120

More information about the jboss-user mailing list