Mantis - Resin
Viewing Issue Advanced Details
1284 major always 08-10-06 06:48 08-21-06 09:21
slonopotamus  
ferg  
normal  
closed 3.0.20  
duplicate  
none    
none 3.0.22  
0001284: void EL functions with String argument produce garbage output
Affected versions: 3.0.14, 3.0.19, 3.0.20
Expected: empty <body></body> tag.
Actual: garbage character (usually character with code 0) between <body> and </body>
To reproduce: rename el-bug.war.zip to el-bug.war, deploy attached JAR-file to Resin and open /el-bug/index.jspx

Source of ru.hh.resin.elbug.Functions.java:

package ru.hh.resin.elbug;

public class Functions {
  public static void doNothingVoid (final String var) {
  }
}

Source of index.jspx:

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root
    xmlns:tags="urn:jsptld:/WEB-INF/tags.tld"
    xmlns:jsp="http://java.sun.com/JSP/Page" [^]
    xmlns="http://www.w3.org/1999/xhtml" [^]
    version="2.0">
  <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
  <html>
    <body>${tags:doNothing("teeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeest")}</body>
  </html>
</jsp:root>

Source of tags.tld:

<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee [^] http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" [^] version="2.0">
  <tlib-version>2.0</tlib-version>
  <short-name>tags</short-name>
  <function>
    <name>doNothing</name>
    <function-class>ru.hh.resin.elbug.Functions</function-class>
    <function-signature>void doNothingVoid(java.lang.String)</function-signature>
  </function>
</taglib>

Notes
(0001449)
slonopotamus   
08-10-06 06:50   
Example can be downloaded here: http://slonopotamus.org/el-bug.war [^]
(0001450)
slonopotamus   
08-10-06 06:52   
Sorry for duplicates, I was trying to attach example WAR.
(0001451)
slonopotamus   
08-10-06 07:12   
Resin 3.0.10 and 3.0.13 are affected too.

(0001454)
anonymous   
08-11-06 02:46   
Actually problem is with Strings in EL expressions.
This example produces same error:

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root
    xmlns:tags="urn:jsptld:/WEB-INF/tags.tld"
    xmlns:jsp="http://java.sun.com/JSP/Page" [^]
    xmlns="http://www.w3.org/1999/xhtml" [^]
    version="2.0">
  <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
  <html>
    <body>${"test"}</body>
  </html>
</jsp:root>
(0001465)
ferg   
08-21-06 09:21   
duplicate of 0001281