On Sun, 9 Sep 2001, Bo Xu wrote:

> Date: Sun, 09 Sep 2001 18:11:11 -0400
> From: Bo Xu <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: newbe: class directory question
>
> [EMAIL PROTECTED] wrote:
>
> > Hi everyone,
> >
> > I have a question about the directory structure, or maybe a question about
> > servlets themselves; I'm not sure yet.
> >
> > 1) Does every class file that I'm going to be using have to be in the
> > WEB-INF\classes directory while using Tomcat?
> > 2) Do all JSP/Servlet servers/containers have this directory?
> >
> > THE chad
>
> only for your first question :-)
>
> * class can be put in:
>     - WEB-INF/classes
>           or
>     - $CATALINA_HOME/classes
>           or
>     - $CATALINA_HOME/common/classes
>
>
> * jar can be put in:
>     - WEB-INF/lib
>          or
>     - $CATALINA_HOME/lib
>           or
>     - $CATALINA_HOME/common/lib
>
>
> good email for you :-)
>

Just a caution, related to your second question.

All servlet containers supporting the Servlet 2.2 or 2.3 specs do indeed
support unpacked classes in WEB-INF/classes, or JAR'd classes in
WEB-INF/lib.  This is defined in the servlet specification, which can be
downloaded from:

  http://java.sun.com/products/servlet/download.html

and makes useful reading in order to understand what is portable and what
is not.

Most containers provide mechanisms to make classes available to all web
applications, but this is *not* standardized, or even guaranteed to be
available.

Craig

Reply via email to