Bug 36867 - Parser unable to identify commented lines ie: <!-- xxxx -->
Summary: Parser unable to identify commented lines ie: <!-- xxxx -->
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.5.7
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2005-09-29 20:53 UTC by RemyZero
Modified: 2005-10-16 16:58 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
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
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch
	at org.apache.jasper.compiler.ErrorDispatcher.jspError
	at org.apache.jasper.compiler.Parser.checkUnbalancedEndTag
	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
	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.