I noted this issue while reviewing code for bug 54801. Reproducible with current 7.0 = 7.0.39. Steps to reproduce: 1. Put the attached "page3.jspx" and "page4.jspx" files into examples webapp. Page 3: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"> <jsp:directive.page isELIgnored="true"/> ${Hello, world!!} </jsp:root> Page 4: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"> <jsp:directive.page isELIgnored="true"/> ${Hello, world!! </jsp:root> 2. Start Tomcat 3. Access http://localhost:8080/examples/page3.jspx This works as expected and prints "${Hello, world!!}" 4. Access http://localhost:8080/examples/page4.jspx This fails with error 500, org.apache.jasper.JasperException: /page4.jspx (line: 21, column: 12) Unterminated ${ tag * root cause *: org.xml.sax.SAXParseException: Unterminated ${ tag org.apache.jasper.compiler.JspDocumentParser.processChars(JspDocumentParser.java:538) org.apache.jasper.compiler.JspDocumentParser.endElement(JspDocumentParser.java:610) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
Created attachment 30170 [details] page3.jspx
Created attachment 30171 [details] page4.jspx
Fixed in trunk and will be included in 7.0.40 onwards. I turned the example JSP documents into unit tests.