jQuery in Action, 3rd edition
The moose likes Other Application Frameworks and the fly likes log4j configuration in Sping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "log4j configuration in Sping" Watch "log4j configuration in Sping" New topic

log4j configuration in Sping

Shantanu Puranik
Ranch Hand

Joined: Jun 10, 2004
Posts: 67
I�ve Tomcat 6 running with jdk1.6 using Spring 2.5 & Eclipse 3.4 IDE

applicationContext.xml contains

The problem is when applicationContext.xml is loaded, following error is generarted

It tries to search file inside <tomcathome>/config/log4j.xml
Whereas what needed is locating file at <context root>/config/log4j.xml

Definitely, it�s one some setting which needs to be altered.
But how & where is my question.

--- Shantanu
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

You can always prefix resource with either "classpath:" or "file:" or "http:"

Classpath looks for the file in the classpath.
File looks in the OS FileSystem
Http looks in your web environment.

Sometimes too, you need to just put a "/" in front of your path. But I doubt that that would work for you.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link: http://aspose.com/file-tools
subject: log4j configuration in Sping
It's not a secret anymore!