Bug 7983 - <fmt:formatNumber type="currency"> problem
Summary: <fmt:formatNumber type="currency"> problem
Status: RESOLVED WORKSFORME
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: EA1
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-11 20:34 UTC by Sean Rohead
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Rohead 2002-04-11 20:34:37 UTC
I have specified the locale as en_US (both with 
javax.servlet.jsp.jstl.fmt.locale property and with <fmt:locale> tag, neither 
makes a difference), but currencies format with a ¤ character rather than a $.

// THIS CODE DOES NOT WORK -- PRINTS ¤300.00
<fmt:locale value="en_US"/>
<fmt:formatNumber value="300" type="currency" />

// THIS CODE WORKS -- PRINTS $300.00
<% java.text.Format format = java.text.NumberFormat.getCurrencyInstance
(java.util.Locale.US); %>
<%= format.format(new Integer(300)) %>