tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10267] New: - Comments in scriptlets break subsequent sections
Date Thu, 27 Jun 2002 02:05:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10267>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10267

Comments in scriptlets break subsequent sections

           Summary: Comments in scriptlets break subsequent sections
           Product: Tomcat 4
           Version: 4.1.3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jeff@socialchange.net.au


Hi,

I've just tried 4.1.3beta with Jasper2, and the following JSP breaks:

<%! static final boolean DEBUG=false; // a static field %>

<%! boolean func() {
    return true;
}
%>

The error is:

root cause 

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

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
/home/jeff/jakarta-tomcat-4.1.3-LE-jdk14/work/Standalone/localhost/wmc/jeff$jsp.java:11:
illegal start of type
        return true;
        ^
/home/jeff/jakarta-tomcat-4.1.3-LE-jdk14/work/Standalone/localhost/wmc/jeff$jsp.java:11: 
expected
        return true;



The java file starts like this:

package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;

public class jeff$jsp extends HttpJspBase {

 static final boolean DEBUG=false; // a static field  boolean func() {
    return true;
}


thanks,

--Jeff

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message