I am using Tomcat 3.1 on Win NT. When I try and bring up my JSP page I
receive the
following error:
Error: 500
Location: /mytest/test.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for
JSPC:\Program
Files\Apache
Group\Tomcat\work\localhost_8080%2Fmytest\_0002ftest_0002ejsptest_jsp_0.java:66:
Undefined variable or class name: profile
proto.Address[] addrs =
(proto.Address[])profile.loadAddresses("18190");
^
C:\Program Files\Apache
Group\Tomcat\work\localhost_8080%2Fmytest\_0002ftest_0002ejsptest_jsp_0.java:74:
Undefined variable: addrsProfile
addrsProfile = addrs[i];
^
C:\Program Files\Apache
Group\Tomcat\work\localhost_8080%2Fmytest\_0002ftest_0002ejsptest_jsp_0.java:123:
Undefined variable: acctProfile
acctProfile =
(proto.Account)profile.loadAccount("18190");
^
C:\Program Files\Apache
Group\Tomcat\work\localhost_8080%2Fmytest\_0002ftest_0002ejsptest_jsp_0.java:123:
Undefined variable or class name: profile
acctProfile =
(proto.Account)profile.loadAccount("18190");
^
C:\Program Files\Apache
Group\Tomcat\work\localhost_8080%2Fmytest\_0002ftest_0002ejsptest_jsp_0.java:179:
Undefined variable or class name: profile
proto.Phone [] phns =
(proto.Phone[])profile.loadPhones("18190");
^
C:\Program Files\Apache
Group\Tomcat\work\localhost_8080%2Fmytest\_0002ftest_0002ejsptest_jsp_0.java:188:
Undefined variable: acctPhone
acctPhone = phns[i];
^
6 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java,
Compiled Code)
at
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java,
Compiled Code)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
I have a JAR file in the WEB-INF\lib directory that contains my beans.
Is there anything
else I am missing. I tried to put the JAR file in the CLASSPATH, but
that did not work.
My bean JAR contains a class called Account, Phone, Officer, Address,
Profile
Here is part of my JSP page:
<%@ page contentType="text/html;charset=WINDOWS-1252"%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=WINDOWS-1252">
<META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
<TITLE>
Hello World
</TITLE>
</HEAD>
<BODY>
<H2>The following output is from JSP code:</H2>
<jsp:usebean id="profile" class="proto.Profile">
<jsp:setProperty name="profile" property="account" value = "18190" />
</jsp:usebean>
<jsp:usebean id="addrsProfile" class="proto.Address">
</jsp:usebean>
<%
proto.Address[] addrs =
(proto.Address[])profile.loadAddresses("18190");
%>
Thanks for any help you can give me