You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stéphane BAUDET <sb...@gltrade.fr> on 2001/04/03 13:11:56 UTC

How to use a directory outside the context

Hello,

I wonder how it is possible to configure Tomcat so I can define a
context where I defined a docbase and use directories which are not
sub-tree of the docbase.

For example, let's assume I've install tomcat on c: and that I use the
context:

        <Context path="/admin" 
                 docBase="webapps/admin" 
                 crossContext="true"
                 debug="0" 
                 reloadable="true" 
                 trusted="true" > 
        </Context>

I want to use in my JSP or servlets a directory which is on the drive
d:, or not under $TOMCAT_HOME/webapps

Is it possible ?
If so how ?


Thanks for your help.

Stéphane

RE: How to use a directory outside the context

Posted by Benoît Jacquemont <be...@smile.fr>.
Hi Stéphane,

Yes, it is possible, you just have to use an absolute path instead of a
relative path. Indeed, any relative path use TOMCAT_HOME as root path.

For example, you can set your docBase to "d:\projets\mon_appli\war". I'm
using this kind of path for development on my Windows box.

Benoît

>
> Hello,
>
> I wonder how it is possible to configure Tomcat so I can define a
> context where I defined a docbase and use directories which are not
> sub-tree of the docbase.
>
> For example, let's assume I've install tomcat on c: and that I use the
> context:
>
>         <Context path="/admin"
>                  docBase="webapps/admin"
>                  crossContext="true"
>                  debug="0"
>                  reloadable="true"
>                  trusted="true" >
>         </Context>
>
> I want to use in my JSP or servlets a directory which is on the drive
> d:, or not under $TOMCAT_HOME/webapps
>
> Is it possible ?
> If so how ?
>
>
> Thanks for your help.
>
> Stéphane