title: Session timeout not happening
body: <p>What are the steps to identify the session has timed out and to redirect it,i hav tried by giving session-timeout as 1 min in web.xml,whether that makes session to timout?</p>
  
  <p>for redirecting in filter:</p>
  
  <pre><code>if (request.getRequestedSessionId() != null   &amp;&amp; !request.isRequestedSessionIdValid()) 
          response.sendRedirect(request.getContextPath() + "/login.html");
                      return;
      }
      else {
          response.setHeader("Cache-Control", "no-cache, no-store, must-       revalidate"); // HTTP 1.1.
          response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
          response.setDateHeader("Expires", 0);
          filterChain.doFilter(servletRequest, servletResponse);
      }  
  </code></pre>
  
  <p>but it not redirecting to login page,what am i missing here?</p>
  
  <p>one more clarification needed is : does url-pattern tag in web.xml should hav the redirection page address?</p>
  
  <pre><code>&lt;filter-mapping&gt;
      &lt;filter-name&gt;SessionTimeoutCookieFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;login.html&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>any suggestion on this please....</p>