Hi MARK... I managed to break the thread.... please see the KLUDGE: WebDav - mapping question post.

I had a look at the code (just enuf to find a kludge) but what actually happens is that the WebDavServlet passes a GET onto the Default servlet. If its a /yada/ it treats that as a folder.... but if its /yada.... it looks for it (as a file), and naturally cant find it.

So when MS drops the trailing slash, because the WEBdav servlet actually doesnt handle it and go "hang on this should actually be a folder", the default servlet is simply saying.... cant find it.

Originally I mapped one servlet that dispatched to the webdav servlet.... ie effectively turned /webdav/start into into /webdav/.... after screwing up the interface and coming to the wrong conclusion, when I did fix it.... it does make MS happy... ie MS displays the folders, however the "dispatch" confuses webdav.... ie MS will display a WEBDAV folder that doesnt exist and if one tries to access a file..... they cant be found. So is seems when the dispatch interface calls into the default servlet, looking for a folder.... the default servlet sees the /webdav/ as a folder.... which is probably right, normally.... but not for webdav.

Anyway after some playing I realized that to make it work.... no matter what the mapping.... the webdav software wants to see "/".... ie the root of the webapp... which kinda makes sense because those are the files and folders the user expects to start with in the client interface...

So the problem became how to make..... /blah/yada/webdav..... look like "/".... and solve the trailing slash problem.... I had to make a simple protocol. ie if its going thru the web dav servlet.... convert the 'non' trailing slash URI to "/"..... if it already has a trailing slash, the existing code turns that into "/"
and then the default servlet returns the listing in that folder.

If I had to try put the problem in plain english.... TC webdav is expecting to return a folder of information and relies on the trailing slash to do that.... when MS drops that trailing slash in a request.... TC looks for the 'entity'.... and its not there.

Even though the trailing slash would make little difference when dealing with servlets... because the webdav servlet is just passing GETS onto a static resource handler.... those trailing slashes are the difference between a folder, and an entity.

The whole problem seems to just be a tiny weenie little trailing slash ;)

KLUDGE: WebDav - mapping question post.... explains the rest... it works well with MS.... hope you give it a try. Please give it a little run with some other webdav clients as well.... because I think they probably honor the folder notation.... cant see any reason why they will not continue to work as normal.... but I havnt tried it.

Thanks...

----- Original Message ----- From: "Mark Thomas" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, July 24, 2007 1:35 AM
Subject: Re: WebDav - mapping question?


David Delbecq wrote:
Tomcat should not refuse webapp/webdav if you have a mapping to
/webdav/*. It should at least dispatch to servlet mapped on /webdav/*.

Tomcat doesn't reject requests of this type . For any directory
resource without a trailing '/' it will do a 302 redirect and add '/'.
The MS client doesn't seem to be able to handle the redirect. This is
probably the cause of the problem. I tried raising this with MS and
got nowhere.

Because of where Tomcat does this redirect, I can't immediately see a
way around this. I'll have a think over the next few days.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to