Could you help check why doFilter is not getting a call
web.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns: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_2_5.xsd" id="WebApp_ID" version="2.5"> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <filter> <filter-name>roseFilter</filter-name> <filter-class>net.paoding.rose.RoseFilter</filter-class> </filter> <filter-mapping> <filter-name>roseFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> </web-app>
class signature:
import org.springframework.web.filter.GenericFilterBean; public class RoseFilter extends GenericFilterBean {
404 is returned during a call to http: // localhost: 8080 / hello / world , I set breakpoints on doFilter, it seems doFilter is not called? (I tried tomcat 6.0.18, 6.0.29, jdk1.6)
java servlets servlet-filters
ebwhite
source share