You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kevin Jackson <fo...@gmail.com> on 2007/10/29 06:42:02 UTC

Webdav servlet

Hi,

I need to extend the webdav servlet so that I can store files outside
of the application context.

Looking at the source for the servlet I think getRelativePath and
(perhaps normalize) need to be changed.

Does anyone who has more knowledge of the src know exactly how I'd achieve this?

Thanks,
Kev

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Webdav servlet

Posted by Mark Thomas <ma...@apache.org>.
Kevin Jackson wrote:
> Hi,
> 
> I need to extend the webdav servlet so that I can store files outside
> of the application context.
> 
> Looking at the source for the servlet I think getRelativePath and
> (perhaps normalize) need to be changed.

It will be much more invasive than that. The WebDAV servlet extends
the DefaultServlet which in turn uses a ProxyDirContext object to
access files. Unpicking this would require a lot of changes.

Better options are:
- Slide
- Use a sub-context (more below)

Assuming you have $CATALINA_HOME/webapps/yourapp and
/some/other/path/webdavroot and you want /some/other/path/webdavroot
editable via http://host/yourapp/edit then place a file called
yourapp#edit.xml in $CATALINA_HOME/Catalina/localhost with the
following contents:
<Context docBase="/some/other/path/webdavroot" >
</Context>

You will need to add WEB-INF/web.xml to /some/other/path/webdavroot
and place the WebDAV servlet definition in the web.xml file.

This is more of a users list question, so please ask any follow-ups there.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Webdav servlet

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------

Hi Kevin,
I did it a while back, I cant remember the details, all I remember is that 
MS clients had a problem with TC's webdav, and if I remember correctly the 
mapping causes problems with index.jsp as a welcome page,
something like that...

Anyway, I did modify it and it works with MS clients, and the mapping is now 
more flexible.
Oh it even works with Glassfish...  (they stole Tomcat... you see ;)

Anyway I made it a separate library so dont have to mess with TC's 
internals...
http://coolharbor.100free.com/tool_webdav.htm
The setup notes are in the sample web.xml file

Enjoy!




----- Original Message ----- 
From: "Kevin Jackson" <fo...@gmail.com>
To: "Tomcat Developers List" <de...@tomcat.apache.org>
Sent: Monday, October 29, 2007 7:42 AM
Subject: Webdav servlet


> Hi,
>
> I need to extend the webdav servlet so that I can store files outside
> of the application context.
>
> Looking at the source for the servlet I think getRelativePath and
> (perhaps normalize) need to be changed.
>
> Does anyone who has more knowledge of the src know exactly how I'd achieve 
> this?
>
> Thanks,
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org