File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes currency format key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "currency format key" Watch "currency format key" New topic

currency format key

Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Hello all,

i have the following format for the currency :


This however results in the following exception :

javax.servlet.jsp.JspException: Wrong format string: '###.###,00'
at org.apache.struts.taglib.bean.WriteTag.formatValue(
at org.apache.struts.taglib.bean.WriteTag.doStartTag(

Could someone please explain how i can make a format that will result in :

1.234,00 ?!

Ok i found out it has to do with the locale. When locale is nl it works, when locale is en_US is throws the exception. How can i make sure no matter what the locale is this format pattern works, without me having to declare a lot of format patterns?!

[ April 21, 2005: Message edited by: Ricardo Estafan ]
I agree. Here's the link:
subject: currency format key
It's not a secret anymore!