• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1941
  • Last Modified:

Decimal Point as a comma

Hey experts,

  I want (using JSTL) a number to be formatted with the decimal point appearing as a comma instead of a dot; any help on how to do that??
0
mte01
Asked:
mte01
  • 2
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
Try to use DecimalFormat: http://www.exampledepot.com/egs/java.text/FormatNum.html

If that doesn't work, create a new string by replacing . by , in your display string using the replaceAll () method provided by String.
0
 
mte01Author Commented:
>>mayankeagle

I said I want it using JSTL. Anyway, I did that by changing the locale using:

<fmt:setLocale value="fr_FR" />

Thanks anyways for your help
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Yeah you can set the locale too - didn't realize you wanted it in French.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now