title: How to call sessionDestroyed when a session times out
body: <p>I am new to JSP. I used the following code in a class that implements <code>HttpSessionListener</code> to get SESSION OUT when the session times out:</p>
  
  <pre><code>    public void sessionCreated(HttpSessionEvent arg0) {  
          System.out.print("SESSION Created");
      }
  
      public void sessionDestroyed(HttpSessionEvent arg0) {
          System.out.print("SESSION OUT");
      }
  </code></pre>
  
  <p>and I set in <code>web.xml</code>:</p>
  
  <pre><code>  &lt;session-config&gt;
       &lt;session-timeout&gt;1&lt;/session-timeout&gt; 
    &lt;/session-config&gt;
  </code></pre>
  
  <p>The servlet waits more than two minutes, then it calls <code>sessionDestroyed</code>.</p>
  
  <p>Is there is a way to force <code>sessionDestroyed</code> when time out ?</p>
  
  <p>Thanks in advance.</p>