tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viktoras Agejevas <v.ageje...@gmail.com>
Subject Default servlet url mapping issue
Date Wed, 20 May 2009 13:17:31 GMT
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?

Thanks,
Viktoras

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message