Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005590 [Resin] major always 11-19-13 03:46 02-13-14 18:54
Reporter VladV View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed   Product Version 4.0.37
Summary 0005590: JSTL bug: empty values handled incorrectly in fmt:formatNumber tag
Description Empty (null) values passed to fmt:formatNumber as "value" attribute are handled incorrectly: instead of being displayed as empty values, they are displayed as values from previously evaluated fmt:formatNumber tags. Please see the example below.

If the value is passed as the tag content, not as an attribute, everything works as expected.
Additional Information Code to reproduce the bug:
<%@ page pageEncoding="utf-8" trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" [^] %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" [^] %>
<html>
<head>
<title>JSP Test Page</title>
</head>
<body>
<c:set var="x" value="12.345" />
<c:set var="y" value="${null}" />
[<fmt:formatNumber maxFractionDigits="2" value="&0000036;{x}"/>]
[<fmt:formatNumber maxFractionDigits="2" value="&0000036;{y}"/>]
[<fmt:formatNumber maxFractionDigits="2">&0000036;{x}</fmt:formatNumber>]
[<fmt:formatNumber maxFractionDigits="2">&0000036;{y}</fmt:formatNumber>]

</body>
</html>

Output:
[12.34]
[12.34] <-- this should be empty
[12.34]
[]
Attached Files

- Relationships

- Notes
(0006397)
alex
02-13-14 18:51

jsp/1dbd
 
(0006398)
alex
02-13-14 18:53

fixed in 4.0.39
 
(0006399)
alex
02-13-14 18:54

jsp/1dbd
 

- Issue History
Date Modified Username Field Change
11-19-13 03:46 VladV New Issue
11-19-13 03:47 VladV Issue Monitored: VladV
02-06-14 11:50 alex Additional Information Updated
02-06-14 11:51 alex Additional Information Updated
02-13-14 18:40 alex Status new => assigned
02-13-14 18:40 alex Assigned To  => alex
02-13-14 18:51 alex Status assigned => closed
02-13-14 18:51 alex Note Added: 0006397
02-13-14 18:51 alex Resolution open => fixed
02-13-14 18:51 alex Fixed in Version  => 3.1.14
02-13-14 18:53 alex Status closed => feedback
02-13-14 18:53 alex Resolution fixed => reopened
02-13-14 18:53 alex Note Added: 0006398
02-13-14 18:54 alex Status feedback => closed
02-13-14 18:54 alex Note Added: 0006399
02-13-14 18:54 alex Resolution reopened => fixed
02-13-14 18:54 alex Fixed in Version 3.1.14 => 4.0.39


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