Paul, --- On Sun, 4/11/10, Paul Carroll <pcarr...@nfmail.net> wrote:
> I am using Tomcat 6.0 on Windows > Server 2003. It seems that when my session expires I > am redirected to the login page which I would expect. > However, my filter is not called when I am redirected to the > login page. When I used Jetty as my web server, the > call was intercepted by the filter before the user was > presented the login page. Does anyone know why this is > the case? The following is the sections of my web.xml > that contains the filter info. > > <filter> > <filter-name>SessionTimeoutFilter</filter-name> > <filter-class>com.mycompany.ui.filters.SessionTimeoutFilter</filter-class> > <init-param> > <param-name>home</param-name> > <param-value>/home.do</param-value> > </init-param> > </filter> > > <filter-mapping> > <filter-name>SessionTimeoutFilter</filter-name> > <servlet-name>action</servlet-name> > </filter-mapping> > > <servlet> > <servlet-name>action</servlet-name> > <servlet-class>com.mycompany.ui.web.ActionServlet</servlet-class> > <init-param> > <param-name>config</param-name> > </init-param> > </servlet> > > <servlet-mapping> > <servlet-name>action</servlet-name> > <url-pattern>*.do</url-pattern> > </servlet-mapping> > > > My index.jsp contains 1 line which redirects to home.do. > Your filter is mapped to <servlet-name> action which is mapped to <url-pattern> *.do Don't know about Jetty, but you will probably get the behavior you expect if you change the <filter-mapping> element to use: <url-mapping>/*</url-mapping> (and remove <servlet-name>) - Bob --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org