You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/07/21 02:20:55 UTC
DO NOT REPLY [Bug 21753] New: -
Custom tags within multiline comments generate compile error
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=21753>.
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=21753
Custom tags within multiline comments generate compile error
Summary: Custom tags within multiline comments generate compile
error
Product: Tomcat 5
Version: Nightly Build
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: Jasper2
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: ecarmich@alumni.rice.edu
Jasper generates incorrect Java code when compiling a JSP page which contains
a custom tag inside a multiline comment, such as the following:
<%@ taglib uri="/test" prefix="test" %>
Hello World
<%
/*
%>
<test:test/>
<%
*/
%>
This is the error message return by the Java compiler:
Generated servlet error:
[javac] Compiling 1 source file
C:\jakarta-tomcat-5
\build\work\Catalina\localhost\webapp\org\apache\jsp\test_jsp.java:76: illegal
start of expression
*/
^
The problem is that generateCustomStartTag and generateCustomDoTag insert
multiline comments of their own. The Java compiler interprets the "*/" at the
end of the inserted multiline comment as the end of the multiline comment from
the JSP page, and returns an error when it finds the closing "*/" from the JSP
page.
I will attach a patch that fixes this.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org