Bug 54069

Summary: Jasper no longer parses <%----------------------------%>
Product: Tomcat 7 Reporter: Guno Heitman <java>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 7.0.32   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Guno Heitman 2012-10-30 07:03:57 UTC
My company's JSPs use a lot of comment blocks like this:

 <%----------------------------%>
 <%-- Blah blah blah         --%>
 <%----------------------------%>

Starting with Tomcat 7.0.32, this causes JasperExceptions:
org.apache.jasper.JasperException: Unterminated &lt;%-- tag

Up until 7.0.30, this worked fine. Perhaps this is introduced by bug 53713?

This is easy to reproduce. Create a jsp file with the following contents:
---
Start of page.
	<%----------------------------%>
	<%-- Blah blah blah         --%>
	<%----------------------------%>
End of page.
---
Visit this jsp page with 7.0.32 and 7.0.30 and see the difference.

I've been looking at the jsp specs to see if <%----------------------------%> might be invalid; perhaps a space is mandatory following the two dashes. But I didn't see that mentioned explicitly anywhere.
Comment 1 Rainer Jung 2012-10-30 08:05:48 UTC

*** This bug has been marked as a duplicate of bug 53986 ***