Bug 36867 - Parser unable to identify commented lines ie: <!-- xxxx -->
Summary: Parser unable to identify commented lines ie: <!-- xxxx -->
Status: RESOLVED INVALID
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-29 20:53 UTC by RemyZero
Modified: 2005-10-16 16:58 UTC (History)
1 user (show)



Attachments

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
(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.