This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
Thought I will add one more way to invalidate session.
We can set MaxInactiveInterval in HttpSession object using the method setMaxInactiveInterval.
Having said that, I am wondering what is the best way to do this?
Please share if anyone knows what's the difference? Following are some assumptions I made. Correct me if I am wrong. 1. HttpSession.setMaxInactiveInterval overrides the entry in web.xml 2. web.xml is configurable???
Joined: Nov 15, 2004
Following are some assumptions I made. Correct me if I am wrong. 1. HttpSession.setMaxInactiveInterval overrides the entry in web.xml
Yes you are correct.
2. web.xml is configurable???
You can configure session time in web.xml with
The difference is you specify session duration in minutes in web.xml whereas in setMaxInactiveInterval() you specify session duration in seconds