This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello All, I have a servlet which uses the Digester class. Now, when running in the Tomcat container, I get a ClassNotFoundException because my app cannot find the jar file. Naturally, it will work if I put the jar file in WEB-INF/lib, but isn't this redundant, since this jar file is already present in CATALINA_HOME/server/lib? How can I reference this jar from my webapp? Thanks!
Thanks. I've removed the jar file from server/lib and placed it in common/lib and everything seems to be working fine. Tomcat has not barfed (since it can still find the jar file with its classloader). I don't know why commons-digester.jar was placed in the server-only server/lib directory. Oh well.
That's correct. Tomcat uses digester to make sense out of server.xml file present in the conf folder.
Joined: Apr 16, 2004
Yes, but for some reason this jar was placed in the server/lib, where it is visible only to Tomcat. I have several apps which use this jar file, so instead of copying the jar into the respective WEB-INF/lib, I moved it to common/lib, so I don't have to have the jar file all over the place. Tomcat didn't complain, so I think the commons-digester.jar can live in common/lib without a problem.