wood burning stoves 2.0*
The moose likes Servlets and the fly likes library directory again Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "library directory again" Watch "library directory again" New topic
Author

library directory again

Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, I recently downloaded Acme API and I was wondering where I should place it so the servlets can use it. Thanks!
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Where you place third-party APIs depends both on how available you want to make them to other software, how they are packaged, and which servlet container you are using.
If your extra classes are in one or more jar files, and you wish to make them available to all your Java programs, just put the jar file(s) in the jre/lib/ext directory of your Java SDK. If you have jar files and you want to make them available to all your servlets you may have a directory scanned by the servlet container Resin looks in resin/lib, for example. If you only want to make the jar files visible to a single web-app or even just a single servlet, you will need to add a <classpath> tag to your server configuration file or to the web.xml file for your web app.
If you just have a directory structure full of class files, you can either jar them up and use the methods above, or add their location to either your system classpath, or add their root directory in a <classpath> tag as above.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: library directory again
 
Similar Threads
WA #1.....word association
Cant use object from another class
Posting to bump up my count...
Text box value is not being completely filled with request attribute
The x900 effect ?