File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes a question about zip and jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "a question about zip and jar file" Watch "a question about zip and jar file" New topic

a question about zip and jar file

will wang

Joined: Dec 10, 2002
Posts: 6
hi guys..
when i used iplanet4.0 for develop a web application including jsp and servlet,i include the Oracle JDBC driver in the jvm classpath of iplanet,it works,today,under tomcat,i use a war to deploy my web application and i put the under WEB-INF/lib/,the database connection could not be got,after some debugs,i found if i change the to classes12.jar,it works again..
could some one else tell me why???
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Because the code in Tomcat that loads up all of the classes from those special directories doesn't load anything but *.jar files. It's just the way the TC developers have chosen to implement their class loading.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Also because a JAR is just a specialized form of ZIP. Otherwise it STILL wouldn't have worked.
However, I'd normally not put the JDBC drivers - or for that matter ANY non-"business" code in the webapp, excepting things that are not sharable anyway. I'd put them in TOMCAT_HOME/common/lib.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: a question about zip and jar file
It's not a secret anymore!