> > The best you can do to place your property file in any directory that 
> > contains to the classpath (e.g. WEB-INF/classes ...) and load the file
> 
> So you are saying (in response to Dan's question) that it is best to
> just keep the log4j.properties file in WEB-INF/classes and to not try
> and move it to somewhere like WEB-INF/classes/resources ?

The way I interpret this discussion is as follows.  If you move the
log4j.properties file from 

WEB-INF/classes

to

WEB-INF/classes/resources

you either have to

create a custom servlet which initializes the log4j.properties file in the
web.xml file, such as:

 <servlet>
     <servlet-name>log4j-init</servlet-name>
     <servlet-class>net.creativerge.util.Log4jInit</servlet-class>
     <init-param>
         <param-name>log4j-init-file</param-name>
         <param-value>WEB-INF/classes/resources/log4j.properties</param-value>
         <description>Initialization file location</description>
     </init-param>
     <load-on-startup>1</load-on-startup>
 </servlet>

OR

you have to modify the environment variable log4j.configuration in the CATALINA
startup script.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Microsoft's Law of Software Engineering: 
Don't worry if it doesn't work right. 
If everything did, we'd be out of a job.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to