2

I have put my jar files in folder named "myLibs" under lib folder of my application. When I run application I get NoClassDefFoundException for the classes which are inside the jars (placed inside myLibs folder). But when I put that inside lib folder I can access it's classes. So my question is: "Can't we create a folder inside lib folder of our application in apache tomcat and put over jars there? Why is this not possible?"

My folder structure:-

TOMCAT_HOME | +----webapps | +---- MyApp | +----WEB_INF | +----lib | +----myLibs 

Apache tomcat version:- 6.0.20

2 Answers 2

1

Tomcat takes the default directory as lib......so if you want to hmake your own folder inside the lib then u probably need to redefine the the path..... look here for more details hope it helps....

Sign up to request clarification or add additional context in comments.

Comments

0

You probably need to adjust your $CLASSPATH to include the path TOMCAT_HOME/webapps/MyApp/WEB_INF/lib/myLibs. You might specify it in shared.loader or common.loader property of /conf/catalina.properties.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.