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.
Created attachment 7411 [details] Proposed patch
Now fixed in the CVS HEAD.