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/testClass.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%2Fjsptest/_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/