Hello Group!
I'm trying to upgrade to tomcat 5.0.16 but I'm having some trouble with just one JSP page. The pagew will not compile and the error points to this line in the JSP:
<jsp:useBean id = "LOG_KEEPER" class="com.k4sv.web.LogKeeper" scope = "application" />
A pretty straight forward JSP line to be sure. Here is the error message:
type Exception report
message description The server encountered an internal error () that prevented it
from fulfilling this request.
exception org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 17 in the jsp file: /LogCheck.jsp
Generated servlet error: [javac] Compiling 1 source file
/usr/local/tomcat/jakarta-tomcat-5.0.16/work/Catalina/k4sv.com/_/org/apache/ jsp/LogCheck_jsp.java:59: LogKeeper(java.lang.String) in com.k4sv.web.LogKeeper cannot be applied to () LOG_KEEPER = new com.k4sv.web.LogKeeper(); ^ 1 error
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:127) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 51) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415) org.apache.jasper.compiler.Compiler.compile(Compiler.java:458) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 52) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 91) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs.
Is there something in the new JSP spec that prevents this syntax? Am I doing something wrong? This page compiles great under 4.1.18 by the way.
For jsp:getProperty and the others, your bean must comply with the JavaBean specification (ie, have a no arg constructor). I think this is indeed a change from 4.1.x (you can compare the generated code).
BTW, you can use the Jasper from 4.1.x with 5.0.x without any problems if you don't care about JSP 2.0 for now (I suggest you care, it's nice :) ).
-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]