In web.xml
put
<session-config>
<session-timeout>
10
</session-timeout>
</session-config>
Question
I have written code using struts. I want to invalidate the session if the user is idle for 10 minutes. I want to write the code in servlets but not in jsp. can anyone suggest?
Solution
In web.xml
put
<session-config>
<session-timeout>
10
</session-timeout>
</session-config>