I'm working with
Tomcat 3.2.1 and I've gotten quite annoyed working with
JSP and session timeouts under it. I have a web app that contains both JSP and
servlets. Everything integrates nicely - cookies, url rewriting, etc. Problems didn't start until I tried to get session timeouts to work. I set up the web.xml file to configure timeouts. For
testing purposes, I used one minute.
The problem I've run into is that I cannot make the JSP pages aware that a timeout occurred. For an example, the following code would work in a servlet:
if (session == null) {
// do some stuff like going to login page
}
In JSP, that'll never be null -unless- you set the following:
<%@ page session="false" %>
However, that is definitely NOT what I want to do. This results in NO session even being declared for the generated servlet. Going the route of trying to manually create a session by declaring a session object and calling the request's getSession() method doesn't help either. The ids returned are not the same so there's way of knowing what is what.
I'm at a complete loss and so are my coworkers.
Any ideas?