Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple CLASSPATH question 1

Status
Not open for further replies.

osubb

Programmer
Jan 21, 2004
11
0
0
US
I'm new to Tomcat (using V5.5). I am doing some tutorials to get up to speed on servlets/JSP. Anyway, I keep getting an error saying it can not find one of my classes. I have put the directory where all my common packages reside in the CLASSPATH var, but Tomcat doesn't seem to find it. The app works fine if I copy the class over to the "classes" dir in my application on Tomcat.

Does Tomcat look at CLASSPATH when finding classes to load? Or is that just a java var and I need all my common classes in the application's "classes" directory?

thanks,

Larry
 
>>>> Does Tomcat look at CLASSPATH when finding classes to load?

No.

If they are common classes, put them in a package, jar it up and put it in TOMCAT_HOME/common/lib or TOMCAT_HOME/shared/lib .

If they are webapp specific, put them in a package, jar it up and put it in TOMCAT_HOME/webapps/yourwebapp/WEB-INF/lib

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
That's what I figured. Just wanted to be sure! Thanks for the help.

Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top