Bug 36867

Summary: Parser unable to identify commented lines ie: <!-- xxxx -->
Product: Tomcat 5 Reporter: RemyZero <hebenezer>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: normal CC: hebenezer
Priority: P2    
Version: 5.5.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description RemyZero 2005-09-29 20:53:04 UTC
Parser unable to identify commented lines ie: <!--  xxxx   --> when there a 
jsp tag inside the comment it.

For ie this (see below) html line:

<!-- wb:set  </wb:set -->	

will produce this error (see below):

Caused by: 
org.apache.jasper.JasperException: /modules/retailSchedule/location/driverSetup
.jsp(71,15) The end tag "&lt;/wb:set" is unbalanced
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError
(DefaultErrorHandler.java:39)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch
(ErrorDispatcher.java:405)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError
(ErrorDispatcher.java:130)
	at org.apache.jasper.compiler.Parser.checkUnbalancedEndTag
(Parser.java:1706)
	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1561)
	at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1789)
	at org.apache.jasper.compiler.Parser.parseOptionalBody
(Parser.java:1060)
	at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
Comment 1 Leon Rosenberg 2005-09-30 17:48:10 UTC
I think you should use <%-- --%> style jsp comments, since jsp compiler can't
know whether you generate html, xml or whatever with your jsps and has to
evaluate everything which isn't out-commented.
Comment 2 Yoav Shapira 2005-10-17 00:58:12 UTC
I think Leon's right.