tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54801] New: EL-like expressions in jsp:scriptlet break compilation of tag files using XML syntax
Date Thu, 04 Apr 2013 22:24:00 GMT

            Bug ID: 54801
           Summary: EL-like expressions in jsp:scriptlet break compilation
                    of tag files using XML syntax
           Product: Tomcat 7
           Version: 7.0.39
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
    Classification: Unclassified

Created attachment 30152

Steps to reproduce:

1. Go to  webapps\examples\WEB-INF\tags\
2. Delete "helloWorld.tag" file and put there "helloWorld.tagx" file attached
to this issue.
The file contains the following plus AL header:

<?xml version="1.0" encoding="utf-8" ?>
<jsp:root xmlns:jsp="" version="2.0">
  // ${foo}
  out.println("Hello, world!!");

3. Start Tomcat and try to open the following page in a browser:

ACTUAL result:
in current TC8 trunk:
org.xml.sax.SAXException: Body of scriptlet element must not contain any XML

This behaviour is caused by "${foo}" being present inside the scriptlet. If I
remove that line, the page is displayed successfully.

I think EL expressions should not be recognized inside of jsp:scriptlet,
jsp:declaration or jsp:expression and should not trigger such an error.

As a confirmation, the following "helloWorld.tag" in JSP syntax compiles and
executes successfully. Thus this issue is with XML syntax only,

  // ${foo}
Hello, world!++

Alternative solution could be to change the error message, but I think it is
not the issue here,
s/ any XML elements / any XML elements or EL expressions/

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message