7 Replies Latest reply on Sep 21, 2013 6:12 PM by abhi.p

    ApplicationSessionExpiryFilter never gets called

    veena pandit

      I have configured a Filter in the web.xml and I have a filter class.  It doesn't seem to be getting called.  I have a page just for the timeout.


      public class ApplicationSessionExpiryFilter implements Filter {

          private FilterConfig _filterConfig = null;


          public void init(FilterConfig filterConfig) throws ServletException {

              _filterConfig = filterConfig;



          public void destroy() {

              _filterConfig = null;



          public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,

                                                                                                           ServletException {

              String requestedSession = ((HttpServletRequest)request).getRequestedSessionId();

              String currentWebSession = ((HttpServletRequest)request).getSession().getId();

              boolean sessionOk = currentWebSession.equalsIgnoreCase(requestedSession);

              // if the requested session is null then this is the first application

              // request and "false" is acceptable

              if (!sessionOk && requestedSession != null) {

                  // the session has expired or renewed. Redirect request



              } else {

                  chain.doFilter(request, response);




      Please help.  We are already in production