tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Accessing a directory/file outside of the webapps directory
Date Fri, 04 Jun 2010 08:46:31 GMT
On 04/06/2010 08:54, Bernard Giannetti wrote:
> One method I have found is to define a context.xml file under the servlet's META-INF
directory and within specify (somehow) the path of the DataFiles directory.  Something such
>     <Context path="../DataFiles" docBase=""  />
> In this case, does this also allow access from any HTTP user?

Yes - so you don't want to do that. That said, I am amazed that even
worked with those settings. Neither the path nor the docBase are valid.

> The second method I've found is to add a grant line to catalina.policy file.  Is this
the right way to go?

Yes. It sounds like you are running under a security manager. In this
case you will need to grant permission for a webapp to access any file
outside of its own docBase.


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

View raw message