F
F C
Bonjour
I checked the newgroups before to send a message.
I need to read the logging configuration from a file.
LogManager.getLogManager().readConfiguration(
getClass().getClassLoader().getResourceAsStream(configFile)
);
This instruction is executed from a data server running in a tomcat
4.0.1 instance.
The data server is in a jar file.
Unfortunately, the three following commands to get an InputStream
instance associated to the configuration file return a null reference:
command a) getClass().getResourceAsStream(configFile)
command b) getClass().getClassLoader().getResourceAsStream(configFile)
command c) Thread.currentThread().getContextClassLoader().getResourceAsStream(configFile)
But, in an application mode (i.e. data server not running in a tomcat
server)
only the previous command a) return null.
Does some one have an idea how can i get an input stream corresponding
to the configuration file ?
I use java 1.4.0 under solaris ( I also tried with java 1.4.1).
Thank you for your help
F
I checked the newgroups before to send a message.
I need to read the logging configuration from a file.
LogManager.getLogManager().readConfiguration(
getClass().getClassLoader().getResourceAsStream(configFile)
);
This instruction is executed from a data server running in a tomcat
4.0.1 instance.
The data server is in a jar file.
Unfortunately, the three following commands to get an InputStream
instance associated to the configuration file return a null reference:
command a) getClass().getResourceAsStream(configFile)
command b) getClass().getClassLoader().getResourceAsStream(configFile)
command c) Thread.currentThread().getContextClassLoader().getResourceAsStream(configFile)
But, in an application mode (i.e. data server not running in a tomcat
server)
only the previous command a) return null.
Does some one have an idea how can i get an input stream corresponding
to the configuration file ?
I use java 1.4.0 under solaris ( I also tried with java 1.4.1).
Thank you for your help
F