To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I want that a session will be closed automatically if the user don't makes any activities for a while. To do that i have add to the web.xml two line (session timeout of 1 minute is only for testing, I will set this later to a higher value)
<?xml version="1.0" encoding="UTF-8"?><web-appxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://java.sun.com/xml/ns/javaee"xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"id="WebApp_ID"version="3.0">
<context-param><description>Close session if there are no user activities (after [session-timeout] minutes)</description><param-name>closeIdleSessions</param-name><param-value>true</param-value></context-param>
<session-config><!-- adjust the session timeout (in minutes) --><session-timeout>1</session-timeout></session-config>
After creating a new session and waiting for more as ten minutes the session is still open and wasn't invalidated... Is there something missing?