File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JSPs and -classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSPs and -classpath" Watch "JSPs and -classpath" New topic

JSPs and -classpath

Gaelle SMITS

Joined: May 16, 2002
Posts: 23
Hi !
I have a question I cannot solve : I have a web application that runs JSp, which calls a function of a Java class.
This class needs elements of a particular .jar.
When I wrote my Java class, I made tests from another java class, but it couldn't run or compile without including the -classpath option in my command line (ex javac -classpath /product/bba/interface/lib/bba.jar).
So now that I want to call my class from a JSP page, how can I do ?
Thanks for any help,

Gaelle.<br />'Never forget to abuse of good things'
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
Can you include that jar file in your web app?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63837

Any jars in the web server container's lib folder(tomcat/lib, resin/lib, etc) will be available automatically to all webapps. To make a jar available for a particular web app, place it in the web app's WEB-INF/lib folder.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JSPs and -classpath
It's not a secret anymore!