• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a question about zip and jar file

 
will wang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys..
when i used iplanet4.0 for develop a web application including jsp and servlet,i include the Oracle JDBC driver classes12.zip in the jvm classpath of iplanet,it works,today,under tomcat,i use a war to deploy my web application and i put the classes12.zip under WEB-INF/lib/,the database connection could not be got,after some debugs,i found if i change the classes12.zip to classes12.jar,it works again..
could some one else tell me why???
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic