Tomcat error while using a class with JSP! -- jakarta 2003-12-09
I believe that you have to package your class ie boots.PVDatabase
as I recall unpackaged classes are not valid
John
-----Original Message----- From: GuptaD@(protected)] Sent: Tuesday, December 09, 2003 9:42 AM To: tomcat-user@(protected) Subject: Tomcat error while using a class with JSP!
Hi All,
I am new to Tomcat so I would really appreciate if somebody could help me in this.
I have Tomcat 4.1.29 installed on my windows 2000 machine. At the same level as examples is in Tomcat path, I've created a directory called boots(this is my application directory.) and have a index.jsp under boots and a class called PVDatabase.class under C:\Program Files\Apache Group\Tomcat 4.1\webapps\boots\WEB-INF\classes directory where C:\Program Files\Apache Group\Tomcat 4.1 is my CATALINA_HOME variable.
I have modified server.xml to include the context boots there. When I try to call this class from my index.jsp it gives me the following error.
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\boots\index_jsp.java:44: cannot resolve symbol symbol : class PVDatabase location: class org.apache.jsp.index_jsp PVDatabase PV1 = null; ^
An error occurred at line: 2 in the jsp file: /index.jsp
Generated servlet error: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\boots\index_jsp.java:46: cannot resolve symbol symbol : class PVDatabase location: class org.apache.jsp.index_jsp PV1 = (PVDatabase) pageContext.getAttribute("PV1", PageContext.PAGE_SCOPE); ^
An error occurred at line: 2 in the jsp file: /index.jsp
Generated servlet error: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\boots\index_jsp.java:49: cannot resolve symbol symbol : class PVDatabase location: class org.apache.jsp.index_jsp PV1 = (PVDatabase) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "PVDatabase"); ^ 3 errors