Pow
Pow

Reputation: 1367

Using .jar file in Tomcat Server

I'm trying to use colt.jar file into my project in Tomcat Server. I have tried to put it into WEB-INF/lib/ , /lib even also in MyProject/lib/. none of them are working. Previously, I have used jar files like Jama-1.0.2.jar or servlet-api.jar and they were working pretty fine. I have tried to use it in my local machine importing the jar file with Eclipse, it works fine. But no idea why not working on the Server side.

Any suggestion please?

ADDED LATER :::: I have added the classpath and then during compilation it did not give me any error. But eventually during runtime, the methods (included to that class) are not working. It's not giving any error. It simply does not proceed with the execution. Need Help :(

Upvotes: 0

Views: 2836

Answers (1)

Arjan Tijms
Arjan Tijms

Reputation: 38163

It seems like you are confused between two different things:

  1. Having the jar on your classpath when compiling your own classes.
  2. Having the jar available at runtime

If you use Eclipse for Java EE developers (see http://www.eclipse.org/downloads/) and create a dynamic web project instead of a regular java project, then jars placed into WEB-INF/lib will automatically be added to the classpath for compilation, and will also be added to the WAR archive that will be deployed to Tomcat.

Upvotes: 5

Related Questions