geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fran Varin <FVA...@AMICA.com>
Subject Re: How to change the default directory
Date Wed, 24 May 2006 12:28:26 GMT

When we start Tomcat we use the "-current" command line parameter to change
the working directory. Once that is set all reference to IO is relative to
that path. So, that enables us to refer to our resources such as Properties
(that are read using Java's File IO API) to ber referenced like...

    ..\\properties\\SystemDefaults.properties

The alternative is to allow Tomcat to default to a directory based on how it
is started. In the case of a Windows Service it ends up using
Windows\system32 as the default working directory and, if memory, serves me
correctly, if you start Tomcat form a .bat file via the command line you
then will find that the working directory becomes the bin directory within
the Tomcat installation directory. 

We could hard code the entire path (ex.
c:\somedirectory\anotherdirectory\xyz.properties) but, when we deploy to
various servers we run the possibility that they are configured differently
and would need to change all of the paths. 

So, the approach I mentioned above is preferable. 

The use of "geronimo_home" could work assuming there is an environment
variable defined (and there is) but, I'm right back in the same boat of
having to change the paths when we deploy to a different application server.
In our case, our production servers are WebSphere so, they do not use
"geronimo_home". However, it may be possible to use some other "generic"
environment variable. That is food for thought...I'll have to look into that
possibility.


--
View this message in context: http://www.nabble.com/How+to+change+the+default+directory-t1670804.html#a4540276
Sent from the Apache Geronimo - Users forum at Nabble.com.


Mime
View raw message