Maurice Yarrow wrote: > I was able to successfully use a filter to map to another servlet > in my web app. However, I was not able to map to tomcat's > DefaultServlet. > > I tried a <filter-mapping> to <servlet-name> of "default" and > also, as the below shows, to a <servlet-name> with the fully > qualified classname for the tomcat DefaultServlet. > Neither worked.
The configuration below works for me ( TC 5.5.9/JDK1.5.0 ), with or without an additional <url-pattern> mapping. So "default" is a valid <servlet-name>; not sure what else might cause your filter to fail. <filter> <!-- print "oink" to stdout :-) --> <filter-name>squealFilter</filter-name> <filter-class>filters.SquealFilter</filter-class> </filter> <filter-mapping> <filter-name>squealFilter</filter-name> <servlet-name>default</servlet-name> </filter-mapping> HTH! -- Hassan Schroeder ----------------------------- [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]