Xavier Cosyns wrote:

> Hi,
>
> Apparently you put your class in the wrong directory,
> as i can see from your stacktrace:
> org.apache.jsp.DBConnection not found.
>
> you'r DBConnection class should reside in
> /org/apache/jsp/


No, this is most likely not correct. "org.apache.jsp" is just the
package that this particular container uses for all servlets it
generates from JSP pages. If it can't find a class that's in the
unnamed package (i.e. no package declaration), it assumes that it's
part of the same package as the "JSP-servlet" and reports the error
this way. See <http://java.oreilly.com/news/jsptips_1100.html> for
details.

> The directories should respect you're package organisation.
>
> So you can create you're directory structure in your webapp directory

 > under WEB-INF/classes or WEB-INF/lib,

>
> normally if it's an external class, it should be considered as a lib,

 > but still you can choose.

Maybe I misunderstand what you mean by "external", but the rules for

what goes in WEB-INF/classes and WEB-INF/lib has nothing to do with
if the class is "external" or not: WEB-INF/lib is for JAR files that
contains classes, WEB-INF/classes is for class files that are not in
JAR files.

Hans

--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to