I have a similar question. I would like to know the path to the tomcat home
directory so that I can store a file there, which won't be deleted when
reploying. I want to use this as an alternative to storing some values in a
database.

Thanks,
Max

----- Original Message -----
From: "David Delbecq" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, January 25, 2007 2:30 PM
Subject: Re: find where webapp installed via java code


> Please qualify 'system path in which the executing webapp is running'.
> do you mean the if your war has been exploded to /tomcat/webapps/myapp/
> Then you need to get this path? It can be tricky, because, even if it
> were possible by some magic including asking class loader where classes
> binaries are located, it could end up being /tomcat/webapps/myapp.war in
> case of non exploded war. And why do you want to access this folder? You
> can already access read-only all it's content using the classloader's
> ressource. And requiring write access is a non sense because this
> content will be completely discarded at next deployement.
> En l'instant précis du 01/25/07 14:11, asaf.lahav s'exprimait en ces
> termes:
> > Hi all,
> >
> > I have a servlet in which I need to find the file system path in which
the
> > executing webapp is running.
> >
> > 10x,
> >
> > Asaf
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to