permaculture playing cards*
The moose likes Struts and the fly likes log4j.properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "log4j.properties" Watch "log4j.properties" New topic
Author

log4j.properties

Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
I am using WSAD 5.1.2 and exploring the struts basic . I am trying to run struts-example.war in my workspace .Everything is running but when I want to print the log in console it is nor working .

I have incorporateted log4j.jar in WEB-INF .

Can anybody know where exactly I have to put the log4j.properties file so that my application will load the file automatically or I have to write a filter to load the file .
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
src directory.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60817
    
  65

Firstly, your jar file needs to go in WEB-INF/lib, not WEB-INF.

The properties file needs to be in the classpath. Usually placing it at WEB-INF/classes does the trick.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: log4j.properties
 
Similar Threads
Log4j configuration issue
Jboss can not recognize custom log4j.properties file
where to put log4j.properties file in visual web jsf
Struts init()
logging in JBOSS