You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Elliott <re...@ubiquitysoftware.com> on 2006/08/16 15:25:36 UTC

Access to directories outside document root?

Hello,

Is it possible to obtain access to an arbitrary directory (possibly
mounted file) which is not below the Tomcat webapps directory from
within a webapp? GetServletContext.getRealpath("") seems to only access
directories below the webapp app directory...

Thanks in advance...
Rob.



Information contained in this e-mail and any attachments are intended for the use of the addressee only, and may contain confidential information of Ubiquity Software Corporation.  All unauthorized use, disclosure or distribution is strictly prohibited.  If you are not the addressee, please notify the sender immediately and destroy all copies of this email.  Unless otherwise expressly agreed in writing signed by an officer of Ubiquity Software Corporation, nothing in this communication shall be deemed to be legally binding.  Thank you.


Re: Access to directories outside document root?

Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Rob Elliott wrote:
> Is it possible to obtain access to an arbitrary directory (possibly
> mounted file) which is not below the Tomcat webapps directory from
> within a webapp? GetServletContext.getRealpath("") seems to only access
> directories below the webapp app directory...

What exactly do you want to achieve?

For example: If you want the contents of the directory /foo/bar to be 
accessible via, say
http://<your Tomcat>/mybardir
you simply have to create a <Context> definition with the "docBase"-attribute 
set appropriately.

Regards
  mks

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