Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

currency format key

 
Ricardo Estafan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

i have the following format for the currency :

###.###,00

This however results in the following exception :

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

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?!

Thanks!!
[ April 21, 2005: Message edited by: Ricardo Estafan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic