You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Layman <ra...@aswethink.com> on 2001/10/11 14:31:27 UTC

RE: org.apache.jasper.JasperException: Unable to compile class fo r JSP

	Because Jasper automatically places your class into a package, you
must explicitly import all classes from the default package (those classes
without a package). 

	Randy

Aren't archives wonderful?

> -----Original Message-----
> From: Anthony Perera [mailto:azp@soliton.com]
> Sent: Thursday, October 11, 2001 9:19 AM
> To: Tomcat-User
> Subject: org.apache.jasper.JasperException: Unable to compile 
> class for
> JSP
> 
> 
> I was using Tomcat 3.2.1 and had a directory under webapps called
> super_database.
> In the directory I had a file named results.jsp. Below that 
> directory I had
> WEB-INF and classes.
> The classes directory contained ConnectionPool.class. The 
> whole thing worked
> fine.
> 
> At the top of results.jsp I had the following line:
> <jsp:useBean id="pool" class="ConnectionPool" type="ConnectionPool"
> scope="application" />
> 
> Inside my code I have a line that says:
> ConnectionPool pool = null;
> 
> 
> Now, I have tried to upgrade to Tomcat 4.0. I simply copied 
> the directory
> structure and files
> from under Tomcat 3.2.1\webapps\super_database to
> Tomcat4\webapps\super_database.
> When I try to load the .jsp file, I get the following error. 
> Why did it work
> on Tomcat 3.2.1
> but not the new version?
> 
> 
> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> An error occurred at line: 2 in the jsp file: /results.jsp
> 
> Generated servlet error:
> D:\tomcat4\work\localhost\super_database\results$jsp.java:64: Class
> org.apache.jsp.ConnectionPool not found.
>                 ConnectionPool pool = null;
> 
> 
> What do I need to change?
> 
> TIA,
> Anthony
> 
>