Just out of interest, but where, how and why does it violate the spec? On Wed, May 20, 2009 at 3:33 PM, Mark Thomas <ma...@apache.org> wrote: > Viktoras Agejevas wrote: >> Hi, >> >> I have a weird default servlet url mapping issue >> (Tomcat 6.0.18 with fully default configuration). >> >> Here's my web.xml configuration: >> >> <web-app ... v2.5> >> <servlet-mapping> >> <servlet-name>AnyServlet</servlet-name> >> <url-pattern>/*</url-pattern> >> </servlet-mapping> >> <servlet-mapping> >> <servlet-name>default</servlet-name> >> <url-pattern>/resources/css/*</url-pattern> >> </servlet-mapping> >> </web-app> >> >> 1. If I request http://localhost:8080/whatever >> AnyServlet handles the request. - OK >> 2. If I request http://localhost:8080/resources/css/style.css >> I get a Tomcat 404 error page. - NOT OK >> 3. If I request http://localhost:8080/resources/resources/css/style.css >> I get the style.css file. - NOT OK >> >> Directory layout is: >> >> webapps >> |--ROOT >> | |--resources >> | | |--css >> | | |--style.css >> | |--WEB-INF >> | | |--web.xml >> >> If I run the same example in Jetty everything works as expected. >> >> I don't know if it's a bug in Tomcat or some Tomcat misconfiguration >> but it clearly violates Servlet specification... >> Any ideas about the issue? > > You can't map the default servlet to anything other than /*. It isn't > designed to work in the manner you are using it. > > Mark > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org