https://issues.apache.org/bugzilla/show_bug.cgi?id=48668

           Summary: Template text that looks like a deferred expression
                    can be mishandled even if EL is ignored
           Product: Tomcat 6
           Version: 6.0.24
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: supp...@netxtra.net


In some cases text that happens to look similar to a deferred expression
(#{..}) can get mangled even if the EL is not active. This appears to only
happen if the text in question immediately proceeds a custom tag (either a full
blown custom tag or a simple .tag file tag). The initial # and { characters get
removed.

This happens in Tomcat v6.0.24 but did not happen in v6.0.20 so appears to be
unintentional.

We have been upgrading legacy sites to Tomcat v6 and have hit this problem.

This problem can be recreated in a bog standard install of Tomcat v6.0.24.
Create a simple .tag file that does nothing more than say 'hello'. Place a
reference to this tag into a JSP with the offending text immediately after it. 

A test JSP that looks something like (note that EL is being ignored)...

<%@ page isELIgnored="true" %>
<%@ taglib tagdir="/WEB-INF/tags/custom" prefix="custom" %>
<html>
<title>Test</title>
</head>
<body>
  <custom:example />#{foo.bar}
</body>
</html>

Where the custom example tag (/WEB-INF/tags/custom/example.tag) looks like
this...

Hello

Rather than the page returning the following...

<html>
<title>Test</title>
</head>
<body>
  Hello#{foo.bar}
</body>
</html>

It will return...

<html>
<title>Test</title>
</head>
<body>
  Hellofoo.bar}
</body>
</html>

Notice the missing # and { from the text.

I don't believe the platform Tomcat is running on matters. Have seen this
behaviour on both Mac OS X and Linux.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to