tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John C. Dale" <...@downinthedesert.com>
Subject [UPDATE - FOUND WORKAROUND FOR LINUX TOMCAT WEBDAV DEPLOYMENTS] WEBDAV for Tomcat 5.0.28
Date Tue, 28 Feb 2006 05:47:01 GMT
I found a workaround.

I wasn't able to use the DAV servlet that ships with Tomcat 5.5.15 and
reverted to the standard 5.0.28 servlet.  I was getting the following error
that I believe was causing an issue with connections from windows web
folders (more below on the error I was receiving on the windows side).

----- ERROR BEGIN -----

java.lang.NoSuchFieldError: resources
	at
org.apache.catalina.servlets.WebdavServlet.doPropfind(WebdavServlet.java:452
)
	at
org.apache.catalina.servlets.WebdavServlet.service(WebdavServlet.java:272)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:540)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
	at java.lang.Thread.run(Thread.java:534)

----- ERROR END -----

Now, on to the workaround for Linux...

I'm using a linux hosting environment with a recent kernel, meaning that I
can do soft links from directory to directory using the mount command.

EX:// mount --bind existing-dir-name soft-link-name

NOTE:  You have to create the directory soft-link-name before doing the
mount.

I have a static website www that I want to access via WebDAV.  I setup a
separate webapp called www_dav with the standard DAV (5.0.28) servlet
deployed/configured within.  Then, within www_dav I setup a soft link
pointing to the www webapp containing the static files.  Then, when
accessing the www_dav context, all requests are mapped to the servlet using
slash splat (/*), and the WebDAV servlet is invoked.  When accessing the www
context, static files are served-up via Tomcat bypassing the WebDAV servlet.

For thousands of hosting customers, this is a maintenance nightmare, but it
is the best I we can do until if/when the above issue is resolved.  I assume
that I need a 'resources' parameter defined in the Servlet deployment
descriptor (see error above), but have no idea what to set it to, and have
no idea if this is the real reason I get the following windows XP WebDAV
connection error (I just know the error goes away with the above
configuration).

"the folder you entered does not appear to be valid"

By the way, kudos to the Microsoft programming team for 1) releasing a
WebDAV client that doesn't appear to work properly with industry-standard
forwarding behavior (see previous email re: note in default webdav web.xml
comments) and 2) providing me with an incredibly bland, non-informative
error message.

Bear Down,

JCD


-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, February 27, 2006 2:44 PM
To: Tomcat Users List
Subject: Re: WEBDAV for Tomcat 5.0.28


John C. Dale wrote:
> What is the recommended deployment of the static site and webdav 
> servlet such that direct access to the files does not go through the 
> servlet, and webdav requests do?

You'll need the webdav servlet from 5.5.x You can get this here:
http://www.apache.org/dist/java-repository/tomcat/jars/servlets-webdav-5.5.1
5.jar

The following is from:
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/webapps/webdav/inde
x.html

To add remote authoring to your web application, you need to make the
following changes:

    * Add the webDAV servlet to your web application. See the web
application deployment descriptor for an example. Don't forget to make it
read/write.
    * Add a servlet mapping for the webDAV servlet with a url pattern of
"/webdav/*" to your web.xml.
    * Add an appropriate security constraint to prevent unauthorised changes
to your web application.
    * You can then edit your web application using a webDAV client using a
url like http://host:port/webapp/webdav


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



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


Mime
View raw message