2013/4/24 Christopher Schultz <ch...@christopherschultz.net>: > > On 4/23/13 11:35 PM, Caldarale, Charles R wrote: >>> From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] >>> Subject: Question on servlet determination >> >>> <url-pattern>/Servlet1</url-pattern> >>> <url-pattern>/Servlet2</url-pattern> >> >> What happens if you try this instead: >> >> <url-pattern>/Servlet1/*</url-pattern> >> <url-pattern>/Servlet2/*</url-pattern> > > While that should work, the original mapping should work, too. The > request for /Servlet1 (plus a slash on the end) should be sent to > Servlet1 with pathInfo="/". >
No. An URL that does not end with "/*" is used for exact matching only. /foo and /foo/* are two different mappings. BTW, 1. in the examples webapp of Tomcat 6 and Tomcat 7 there is RequestInfoExample servlet that you can play around with. E.g. http://localhost:8080/examples/servlets/servlet/RequestInfoExample/foo/bar Adding an extra "/" works correctly. 2.Handling of welcome files in Tomcat 7 depends on "strict servlet compliance" setting (see Migration guide and system properties page in Configuration reference). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org