Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j configuration in Sping

 
Shantanu Puranik
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
and
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.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic