Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

AW: JasperException while running JSP

Bernhard Slominski

2005-02-18

Replies:

Hi,

in Tomcat Version 5.5.4 there is a bug in the JSP Compiler Jasper, it
sometiems looses the classpath (Bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=32330)
This is fixed in 5.5.7.

So there are two ways to fix it:
1. Restart Tomcat
2. Upgrade to 5.5.7

Cheers

Bernhard

-----Ursprüngliche Nachricht-----
Von: U K Laxmi [mailto:laxmiuk@(protected)]
Gesendet: Freitag, 18. Februar 2005 04:27
An: tomcat-user@(protected)
Betreff: JasperException while running JSP


I have integrated tomcat 5.5 with apache 2
successfully and i could able to run sample JSPs. Now
i created a jsp page which will inititate a Java
program called TestSQLLoad.java. TestSQLLoad.java
talks to Ms Access database and gets me reuired fields
from databasae and it will be displayed on browser
thro' JSP page test-db.jsp. I'm using Netscape 7.2
browser. When i run test-db.jsp after running tomcat &
apache, it gives JasperException. It's saying -
"TestSQLLoad cannot be resolved or is not a type".

I created jar file with TestSQLLoad.java &
TestSQLLoad.class and put it in
TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
well as TOMCAT_ROOT/common/lib directories. Thinking
that class loader is unable to find the class, i put
the above directories in my class path as well. Where
i'm going wrong? What's happenning. Pls help.

Here is the exception that's displayed on the browser.

org.apache.jasper.JasperException: Unable to compile
class for JSP

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError (ErrorDispatcher.java:3
28)

org.apache.jasper.compiler.JDTCompiler.generateClass (JDTCompiler.java:397)

org.apache.jasper.compiler.Compiler.compile (Compiler.java:288)

org.apache.jasper.compiler.Compiler.compile (Compiler.java:267)

org.apache.jasper.compiler.Compiler.compile (Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java:5
56)

org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:2
96)

org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:295)

org.apache.jasper.servlet.JspServlet.service (JspServlet.java:245)
 javax.servlet.http.HttpServlet.service (HttpServlet.java:802)


   
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.