Heinz Wehner wrote:
> Craig,
>
> >>
> Add the JAR files to your system CLASSPATH, before you run the
> "startserver" script. The script adds on the extra class path settings
> that are needed to run the engine itself, and the associated examples.
>
> In a Java2 environment, you also have the choice of installing JAR files as
> system extensions, by putting them in the following directory (where
> {JDK_HOME} is the base directory of your Java2 install:
>
> {JDK_HOME}/jre/lib/ext
> <<
>
> Thanks for your comments. Adding the servlet JAR to the class path works
> but this solution may only be well suited for a small number of shared
> archives. In case of servlets, this method is limited since you cannot add
> every servlet JAR to the class path because of length restrictions. I'm
> really amazed that JSWDK does not offer a more elegant and unrestricted
> method for invoking servlets from JARs.
>
> Take a servlet engine like ServletExec 2.1 for example and you know how
> easy this can be. Just put your classes and JARs into the \Servlets
> directory, that's all. If the servlet to invoke matches the name of a JAR,
> ServletExec opens it and searches for the class file in the JAR.
>
The suggestion of adding the JAR file to the class path is specific to the
JSWDK (and the JSDK before it), because these environments have no concept of
specialized class paths for servlets, auto-reloading, or anything of the
sort. The only choice you have is to use the class path (or the JDK 1.2
extensions mechanism.
If you review what JSWDK stands for (Java Servlet Web ***Development*** Kit),
you won't be so surprised about why it does not offer "a more elegant and
unrestricted method for invoking servlets from JARs". At present, these
methods are the purview of the various servlet engines designed for production
environments -- in the future, I would not be surprised to see the Jakarta
project (http://jakarta.apache.org) add some production-friendly features like
this to the basic JSWDK implementations.
>
> Heinz Wehner
> (Karlsruhe, Germany)
>
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html