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

Classpath question

 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am having trouble setting up my classpath on Tomcat. I am receiving errors for log4j and hibernate.cfg.xml. Apparently they are not being found in the classpath.
I have a few questions:

1. Do I have to use the common/lib directory or can I use webapps/<mywebApp>/lib? I would prefer the latter since there are several other projects under Tomcat.

2. Is there java code I could use for debugging? In the past I have tried <%=System.getProperty("java.class.path") %>.

3. I am adding all of my jars and property files in webapps/<mywebApp>/lib. Will these get picked up and added to the classpath on startup?

Thanks!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat only looks for Jar files under WEB-INF/lib.

Put your log4j.properties file (and any other file that needs to be on the classpath) in WEB-INF/classes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic