jQuery in Action, 3rd edition
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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "log4j.properties" Watch "log4j.properties" New topic


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

Joined: Jan 10, 2002
Posts: 63334

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]
I agree. Here's the link: http://aspose.com/file-tools
subject: log4j.properties
It's not a secret anymore!