P
Peter Bernhardt
Hi NG,
my application needs to know the complete path to the tomcat host's
appbase directory to read params in the context.xml file stored there
and I don't know how to find it.
Ok I can find the tomcat home with System.getProperty("catalina.base")
but additionaly I need the subdirectory name defined in appbase=... of
the <host> paragraph in tomcat's server.xml.
Ok I could read this server.xml but there are things I can't (or will
not) expect from a tomcat installation:
- that the server.xml is stored in %tomcat home%\conf
- that this server.xml contains only 1 <host> paragraph and if there
are more than 1 which of them belongs to my webapp?
- that the appbase directory is a subdirectory of %tomcat home%
Therefore my question:
please can somebody give me an idea how to get this path.
MTA
Peter
my application needs to know the complete path to the tomcat host's
appbase directory to read params in the context.xml file stored there
and I don't know how to find it.
Ok I can find the tomcat home with System.getProperty("catalina.base")
but additionaly I need the subdirectory name defined in appbase=... of
the <host> paragraph in tomcat's server.xml.
Ok I could read this server.xml but there are things I can't (or will
not) expect from a tomcat installation:
- that the server.xml is stored in %tomcat home%\conf
- that this server.xml contains only 1 <host> paragraph and if there
are more than 1 which of them belongs to my webapp?
- that the appbase directory is a subdirectory of %tomcat home%
Therefore my question:
please can somebody give me an idea how to get this path.
MTA
Peter