tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Trying to access a directory outside docBase... is it possible ?
Date Tue, 15 Dec 2009 16:28:10 GMT
Pid wrote:
> On 15/12/2009 16:05, Peter Crowther wrote:
>> 2009/12/15 André Warnier<>
>>> But maybe you could just create a link, inside your deployment 
>>> directory,
>>> to the mount ?
>>> /opt/Tomcat/webapps/myApp/docs -->  /opt/document-repository
>>> If you're going to do this, be Very Very Careful.  Tomcat doesn't follow
>> symbolic links by default, even on UNIX.  This is for a very good 
>> reason: if
>> you do this, Tomcat *will* follow the symlink and delete your PDFs 
>> when you
>> undeploy your webapp.

(Although I did specify read access for the Tomcat user-id.  If it does 
not have write access to the directory pointed to, it should not be able 
to delete the files, right ?)

>> You probably don't want this to happen.
>> 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.  Chris?  You're
>> generally the coder with quick hacks already developed...
> The OP already has a servlet AFAICT.  It's just not working.
I think indeed the OP has some kind of servlet, and that one works.
But I understood that he wanted Tomcat to serve these documents 
directly, as files, not going through a servlet.
Maybe I got that wrong.
OP ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message