Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Restrict WebDAV servlet to context subdirectory

Sven Kuenzler

2003-06-02


I would like to use the webdav servlet in the context of another web
application. In particular, WebDAV only should make files beneath a
certain subdirectory, say "docs/usr", available.

So I tried:

<servlet-mapping>
  <servlet-name>webdav</servlet-name>
  <url-pattern>/docs/usr/*</url-pattern>
</servlet-mapping>

However, this produces strange behaviour trying to do a PROPFIND on
several locations.
If I try to access /webapp/docs/usr, PROPFIND returns the files
contained in the directory. That's what I expected.
But:
If I try to access /webapp/docs/usr/, PROPFIND gives *all* files beneath
the webapp root.
If I try to access /webapp/docs/usr/foo.txt (which exists in the
folder), I get an 404 Not Found.

I looked into the WebDAV servlet if I there is a "mount point" parameter
or something like that. But there is not.

Anything else to try?

Thanks, Sven



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.