Hi guyz, I am trying to allow user to set his Session time.After that time Session must expires.I am writing the pseudocode here: 1: Get the user defined time in sessionTime 2: mySession.setMaxInactiveInterval(sessionTime) 3: if(mySession==null) out.println("Session Expired") esle out.println("Session Active") Explanation:- Step 1 is done is a 1st Servlet Step 2 is done in a 2nd Servlet Step 3 is done in a 3rd Servlet
A/C to me the above logic is clear.But when I run Servlet, I give i/p 1.That is 1 seconds Session time, But Session is active after 1 second and expires beore 1 minute.Why not it expires right after 1 second?. Bye, Viki.
• Sun Certified Programmer for Java 2 Platform (SCJP2)
• IBM Certified Professional for Object Oriented Analysis and Design with UML
• IBM Certified System Administrator for WebSphere Application Server v5.0
• Certified Business Analysis Professional (CBAP®)
As mentioned above, I would not expect the container to invalidate the session exactly on x number of seconds. Most likely the container checks for timed out sessions once every X minutes. I would consult the docs of the server you are using to see if you can adjust this, or at the very least see if you can determine the value.