Reputation: 1323
I am building a Java servlet which requires some jars(libs) for testing in the local server (e.g. Tomcat), but does not need these when the servlet is deployed to the production server (as these are already available in the production). Are there any best practices / approaches recommended to achieve this?
Upvotes: 1
Views: 35
Reputation: 11547
I would add the library JARs to the local app-server installation, to make it look similiar to the production server you are later deploying to.
In the case of pre tomcat 6:
tomcat-dir/common/lib
edit: In the case of tomcat 6 and later:
tomcat-dir/lib
The consequence would be that possible other apps you run at your local server will also see this lib. But maybe that is not a problem Does Tomcat load the same library file into memory twice if they are in two web apps?
Upvotes: 1