> I have seen no responses to this.
> Should I assume it is a bug and
> submit it to bugzilla?

You can, but I don't think we can fix it.
Some path manupulation opertaions are extremely tricky, because the servlet
itself doesn't have a way to know how it's mapped.

Instead of dealing with these problems, I would use a second context (with
the same docBase as a the first one), where the WebDAV servlet would be
mapped as /*.

Slide has the same same problems as the default servlet in Catalina.

Remy


> I wanted to allow my users to access various subtrees
> of my site with WebDAV so I added the following
> to my web.xml
>
>   <servlet>
>     <servlet-name>webdav</servlet-name>
>
> <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
>   ...
>   </servlet>
>
>   <servlet-mapping>
>     <servlet-name>webdav</servlet-name>
>     <url-pattern>/Projects/First/Documents/*</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>webdav</servlet-name>
>     <url-pattern>/Projects/Second/Documents/*</url-pattern>
>   </servlet-mapping>
>   ...
>
>
> This seems to ALMOST work with Tomcat 4.0 rc2
> When I use NT4 Explorer Web Folders to connect
> it connects fine and shows the correct
> contents of /Projects/First/Documents/.
>
> But, as soon as I tried to access any contents
> I got a rather uninformative error.  I noticed
> however that the localhost_log would say something like:
>
> 2001-11-07 17:50:15 webdav: DefaultServlet.serveResource:  Request
PathInfo
> '/ZZZ.txt
>
> when I suspected that the PathInfo should have been
> /Projects/First/Documents/ZZZ.txt
>
> As a test I put a file called ZZZ.txt in the root of
> my web app and sure enough it opened it.
>
> After tracing thru things it wasn't clear to me
> why the getRelativePath(request) call in
> DefaultServlet.serveResource() was only returning
> the last part (only happens on the GET call),
> but to see if I could get the
> correct behavior I changed the line
>    String path = getRelativePath(request);
> to
>    String path = request.getRequestURI().substring(
>        request.getContextPath().length());
>
> This gave the correct path and allowed proper
> navigation and opening of the files.
>
> This looks like a bug.  Maybe because development
> and testing assumed that the servlet-mapping
> url-pattern would always be /*.
>
> Note that my mapping above is NOT THE SAME AS
> using 'scope' because there are multiple subtrees
> and each has different security constraints.
> Also I still want users to access
> other paths in the app without invoking WebDAV.
>
> Frank Lawlor
> Athens Group, Inc.
> (512) 345-0600 x151
> Athens Group, an employee-owned consulting firm integrating technology
> strategy and software solutions.
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to