Bug 37749

Summary: when NO LOCALE browser, <fmt:formatNumber> doesnt work.
Product: Taglibs Reporter: viewhero <viewhero>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description viewhero 2005-12-02 05:24:11 UTC
use Firefox 1.5 that has NO LOCALE(all of locales deleted)

this formatting code does not work.

<fmt:formatNumber value="12345.67" type="currency"
groupingUsed="false" maxIntegerDigits="4"
maxFractionDigits="0" />

should correctly result is 12345
but, case of NO LOCALE result is 12345.67

maxFractionDigits attribute is ignored.

if NO LOCALE(mabye locale is null), work as en(English) locale.

and, when Firefox has some locales, worked correctly.

thank you.
Comment 1 Pierre Delisle 2005-12-09 07:48:26 UTC
The spec says the following:

  If this action fails to determine a formatting locale, it uses Number.toString()
  as the output format.

This explains why all formatting attributes are ignored.

Comment 2 Pierre Delisle 2005-12-09 19:19:22 UTC
An RFE has been files with the JSTL spec. See:
https://jstl-spec-public.dev.java.net/issues/show_bug.cgi?id=23