tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernard Giannetti <>
Subject RE: Accessing a directory/file outside of the webapps directory
Date Fri, 04 Jun 2010 09:05:59 GMT

Thanks - I'll try the second method.  I don't know if I am or am not running under a security
manager.  I've just got a standard install of Tomcat - so whatever comes out of the box is
what I'm running.

BTW, I've not be able to get either method to actually work at this stage...just stumbling
my way through the dark!

> Date: Fri, 4 Jun 2010 09:46:31 +0100
> From:
> To:
> Subject: Re: Accessing a directory/file outside of the webapps directory
> 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.
> Mark
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
View photos of singles in your area! Looking for a hot date?
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message