Tomcat works fine, it is your WAR that is screwed up.
under WEB-INF there are two directories /lib and /classes
you have added in a JSP directory, and then you set your context root to
point to WEB-INF/xxx.
when you do this, Tomcat expects another (a second one) WEB-INF to be
available under WEB-INF/jsp
look at the servlet specification and on the other tomcat examples on how a
WAR file should look. the hint I can give you now is that WEB-INF is your
context classpath, all other files should be stored outside, and the context
root should point to the root of the WAR file.
Filip
~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net
>-----Original Message-----
>From: Will England [mailto:[EMAIL PROTECTED]]
>Sent: Monday, July 23, 2001 1:15 PM
>To: [EMAIL PROTECTED]
>Cc: will a england
>Subject: JSP Compile Test Case
>
>
>Hi!
>
>Got around to writing a test case.
>
>Data:
>
>SunOS 2.7
>JDK 1.2
>Tomcat 3.2.2
>
>Setup:
>
>I have a single JSP page that retrieves a String from a java class, then
>prints the string.
>
>Code Layout:
>
>The one class:
>/webhome/jsptest/html/WEB-INF/classes/com/layoutwizard/testcase/tes
>tClass.class
>
>The one JSP
>/webhome/jsptest/html/WEB-INF/jsp/index.jsp
>
>The install directory:
>/usr/local/tomcat-3.2/jakarta-tomcat/
>
>I'm using the distribution server.xml, with one addtion:
>
>
>--- server.xml excerpt ---
><Context path="/jsptest"
> docBase="/webhome/jsptest/html/WEB-INF/jsp"
> debug="0"
> reloadable="true"
> >
></Context>
>--- end server.xml excerpt ---
>
>
>There is no web.xml, because there are no servlets in this case.
>
>Tomcat is using the following as a classpath:
>
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/ant.jar
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/jasper.jar
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/jaxp.jar
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/parser.jar
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/servlet.jar
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/test
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/tools.jar
>/usr/local/tomcat-3.2/jakarta-tomcat/lib/webserver.jar
>/usr/java1.2/bin/../lib/tools.jar
>
>
>The JSP is coded as follows:
>--- begin jsp code ---
>
><html> <head> <title>The Name We Got Is</title> </head>
><body>
><h1>Pulling a name from a java class </h1>
><%@ page import="com.layoutwizard.testcase.*" %>
><%@ page import="java.lang.*" %>
><jsp:useBean id="bob" class="com.layoutwizard.testcase.testClass"/>
><%String name = bob.getName();%>
><P><%=name%> </p>
></body> </html>
>
>--- end jsp code ---
>
>
>All things considerd, I get the following error on trying to load the JSP:
>
>org.apache.jasper.JasperException: Unable to compile class for
>JSP/usr/local/tomcat-3.2/jakarta-tomcat/work/localhost_8080%2Fjspte
>st/_0002findex_0002ejspindex_jsp_0.java:13: Package
>com.layoutwizard.testcase not found in import.
>import com.layoutwizard.testcase.*;
>
>Other JSP's that do not rely on code in the com.layoutwizard.* (or other
>external hirearchies) work just fine.
>
>SO, What Am I Doing Wrong?
>
>Thanks in advance, again!
>
>Will
>
>
>--
> /~>'find `funny quote`': Command not found; humor not installed.
> 1986 Concours 72,xxx 1982 Maxim 12,xxx (For Sale!) CDA #00046
> Overland Park, KS [EMAIL PROTECTED] PCS: 316-371-FOAD
> http://will.mylanders.com/
>
>