----- Original Message -----
From: "Angelov, Rossen" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, October 15, 2008 8:29 PM
Subject: tomcat 6 and subdirectories
Hi,
I recently started using Tomcat 6 but can't configure it to map
subdirectories to same servlet within the default context. I didn't have
problems with the same setup in Tomcat 5.
Here is an example.
http://mysite/test.html - maps to the application servlet and works as
expected
http://mysite/directory/test.html - doesn't maps to the application
servlet and fails to display correctly
The second link works only after I create an additional context, but
it's not an acceptable solution because there are many directories in
application base.
<Context path="directory" docBase="" />
In web.xml I have the following servlet mapping:
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
I tried different url patters to match subdirectories, but neither one
worked:
<url-pattern>/*</url-pattern>
<url-pattern>/directory/*</url-pattern>
<url-pattern>directory/*</url-pattern>
Ross Try
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/directory/*</url-pattern>
</servlet-mapping>
ie just map it more than once....
I havnt noticed a change in behaviour between TC's... using the multi
mapping idea above, maybe some other subtle thing happening as well...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
If you cant pay in gold... get lost...
http://coolharbor.100free.com/debt/usadebt.htm
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]