my dog learned polymorphism*
The moose likes JSP and the fly likes JSTL - Fmt parseNumber problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL - Fmt parseNumber problem" Watch "JSTL - Fmt parseNumber problem" New topic
Author

JSTL - Fmt parseNumber problem

Phil Jahan
Greenhorn

Joined: May 02, 2006
Posts: 3
Hi all,

When using <Fmt:formatNumber type="currency"... it will only output a currency symbol if the users locale matches the currency code (if supplied) otherwise it will display an ISO code instead (eg USD3.50).

I realise why it would do this (to avoid confusion over exactly what dollar we are using). My big problem however is when you try and parse this number string with <fmt arseNumber type="currency"..., if it contains the ISO code then I get a Unparsable Number exception. If the string contains a symbol then it is ok.

Does anyone know how to get around this problem?

Thanks
 
GeeCON Prague 2014
 
subject: JSTL - Fmt parseNumber problem