You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by adi <ad...@myrealbox.com> on 2002/09/20 12:27:25 UTC
Problem with url patterns II
Hello,
I encountered a very strange problem with servlet mappings.
I have the following entry in my web.xml file :
<servlet>
<servlet-name>MyDefaultServlet</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>MyDefaultServlet</servlet-name>
<url-pattern>/admin/*</url-pattern>
</servlet-mapping>
All I am doing here is passing all requests to the 'admin' directory
and its children to the default servlet with listings=true.
A simple trick to allow listings on specific directories.
The problem is that when I point the browser to:
http://localhost/MyContext/admin/
I get the listings for http://localhost/MyContext/
Now, If I point the browser to http://localhost/MyContext/admin/admin/
... I get the listings for the right directory.
Any idea whats going on ?
And more than that:
If I change the pattern from /admin/* to /admin/
Everything works fine but than mapping will not kick off for sub-directories
of 'admin'
Will much appreciate any help.
Adi
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>