You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2009/12/15 17:56:32 UTC

RE: Trying to access a directory outside docBase... is it possible ?

> From: peter.crowther3@googlemail.com
> [mailto:peter.crowther3@googlemail.com] On Behalf Of Peter Crowther
> Subject: Re: Trying to access a directory outside docBase... is it
> possible ?
> 
> This is a common enough use case (it comes up about once a month on the
> list) that Someone may have coded a quick "serve the content from this
> directory" servlet, probably based on the root webapp.

A special servlet is not required - Tomcat's default servlet will do the job.  Paolo already gave the correct answer, which is to set up a <Context> element for a dummy webapp:

> > <Context  docBase="/opt/documents" path="/documents"/>
>
> You must create documents.xml in conf/Catalina/localhost/ and put there this
> directive, not in web.xml

Although the path attribute must not be used - just the docBase.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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