https://bz.apache.org/bugzilla/show_bug.cgi?id=63828
--- Comment #4 from Michael Osipov <micha...@apache.org> --- (In reply to Mark Thomas from comment #3) > The way the WebDAV servlet is implemented, it just isn't designed to serve > arbitrary locations within the web app at arbitrary paths. Refactoring that > would be a lot of work. > > Taking the use case here you want /WEB-INF/diforms to be accessible via > WebDAV at /diforms (and any similar example) then I would suggest the > following approach: > > Use security constraints to limit WebDAV methods to the target URL: > > <security-constraint> > <display-name>Block WebDAV</display-name> > <web-resource-collection> > <web-resource-name>All</web-resource-name> > <url-pattern>/*</url-pattern> > <http-method-omission>GET</http-method-omission> > <http-method-omission>POST</http-method-omission> > <http-method-omission>OPTIONS</http-method-omission> > </web-resource-collection> > <auth-constraint /> > </security-constraint> > > <security-constraint> > <display-name>Allow WebDAV</display-name> > <web-resource-collection> > <web-resource-name>Diforms</web-resource-name> > <url-pattern>/diforms/*</url-pattern> > </web-resource-collection> > </security-constraint> > > > > Use Resources to map the required resources to the desired target URL: > > <Context> > <Resources> > <PreResources > className="org.apache.catalina.webresources.DirResourceSet" > base="${catalina.base}/webapps/ROOT/WEB-INF/diforms" > webAppMount="/diforms" /> > </Resources> > </Context> > > > I am resolving this as WORKSFORME on the basis that I believe the > configuration approach above solves the general problem. If not, the users@ > list is probably the best place to continue the discussion as it is likely > that a configuration solution will exists even if the one above is > insufficient. I accept this as one possible workaround, but don't see have the WebDAV servlet will serve this path only. It simply can. It will also serve the entire context. But it is good that you documented that the servlet has never been designed for that. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org