You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/04/28 13:12:51 UTC
DO NOT REPLY [Bug 19382] New: -
EL to String conversion outputs "0"
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19382>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19382
EL to String conversion outputs "0"
Summary: EL to String conversion outputs "0"
Product: Tomcat 5
Version: Nightly Build
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: erik@beijnoff.com
When an EL expression evaluates to null, the output is "null" when it isn't
added togheter with something. When a try to add the empty EL parameter to an
empty String, the value output is "0".
CASE 1:
This data:
<body onload="${param.onload}">
Outputs this:
<body onload="null">
I'm not 100% on the case above. According to 7.1 "Coerce A to String" in the
JSTL specification, this behavior is incorrect. The value output should be "".
BUT if the part shown above belongs in section 7.4 "Coerce A to any other type
T", the behavior is correct.
CASE 2:
This data:
<body onload="${param.onload + ''}">
Outputs this:
<body onload="0">
This behavior is clearly wrong. The output should be "", according to section
7.1 "Coerce A to a string". The value output now is "0".
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org