Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001431 [Resin] major always 10-30-06 16:30 10-31-06 13:53
Reporter ccwf View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.22 Product Version 3.0.22
  Product Build
Summary 0001431: multiple bugs with EL expression output in JSP document template data
Description Using expressions like

${'C'}a b c d e

and

${'}'}A B C

in template text in JSP documents (.jspx file) results in miscompiled .java source files in the work directory which have an extra, garbage character being output at the end of the directive.

The second example, a right curly brace inside a string literal exhibits an additional bug: an escaped quote is output before the right curly brace. The spec says that ${'}'} should just output the right curly brace.

Finally, the results of the EL expressions in template text are XML-escaped, whereas the spec implies that they should be unescaped (and that <c:out> should be used to produce escaped text).

These bugs only affect EL expressions in template data (outside of actions) in JSP documents, not JSP pages.
Steps To Reproduce
Additional Information Attached is a small JSP document exhibiting the bugs. The meat of the test is in the following lines:

    <jsp:scriptlet>
         pageContext.setAttribute("testString", "-'-");
    </jsp:scriptlet>
    Extra character at end: ${'string'}a b c d e<jsp:text>
    Extra character at end: ${'C'}1 2 3 4 5</jsp:text><jsp:text>
    Character escaped: ${testString}1 2 3 4 5</jsp:text><jsp:text>
    Extra characters before { and at end: ${'}'}A B C</jsp:text>


When run on my test system, it results in the following output:

    Extra character at end: stringa b c d ec
    Extra character at end: C1 2 3 4 5c
    Character escaped: -&0000039;-1 2 3 4 5
    Extra characters before { and at end: &0000039;}A B C&0000034;
Attached Files

- Relationships

- Notes
(0001559)
ferg
10-31-06 13:53

1433
 

- Issue History
Date Modified Username Field Change
10-30-06 16:30 ccwf New Issue
10-31-06 13:53 ferg Note Added: 0001559
10-31-06 13:53 ferg Assigned To  => ferg
10-31-06 13:53 ferg Status new => closed
10-31-06 13:53 ferg Resolution open => fixed
10-31-06 13:53 ferg Fixed in Version  => 3.0.22


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker