servlet and jar file

F

f

I am using Tomcat for servlet. Here is what in Tomcat doc:

/WEB-INF/lib/ - This directory contains JAR files that contain Java
class files (and associated resources) required for your application,
such as third party class libraries or JDBC drivers.

However, my servlet use oracle driver-classes12.zip. I put it under

tomcat dir/webapps/mywebapp/WEB-INF/lib/classes12.zip.

my servlet at

tomcat dir/webapps/mywebapp/WEB-INF/classes/com.myc.myp.myservlet.class

But my serlvet can not find the classes12.zip.

If I add the class path in catalina.bat, my servlet can find it.

How can I fix it?

Thanks,

ff
 
S

Scott D. Barrish

1) You have to unzip the files under classes. Making sure that you call the
class through it's fully qualified name: package.name.Class.

2) Or you can unzip the files,and createa jar file and place the jar file in
the lib folder.

Sincerely,
Scott D. Barrish
 
X

xx

SO zip is not accepted?

Scott D. Barrish said:
1) You have to unzip the files under classes. Making sure that you call the
class through it's fully qualified name: package.name.Class.

2) Or you can unzip the files,and createa jar file and place the jar file in
the lib folder.

Sincerely,
Scott D. Barrish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,264
Latest member
FletcherDa

Latest Threads

Top