Currently I'm having a problem displaying formatted decimals. In my local machine I have a decimal value: 0.002100000000 stored in database.
<h:outputText value="0.002100000000" converter="#{bigDecimal4DigitsConverter}" />
@FacesConverter("bigDecimal4DigitsConverter")
public class BigDecimal4DigitsConverter extends BigDecimalConverter {
private DecimalFormat format = new DecimalFormat("#,##0.0000");
@Override
protected DecimalFormat getDecimalFormat() {
return format;
}
}
My problem is on my local machine it displays: 0.0021 - US Settings But in another server 0,0021 - French Settings
Why is that? I thought DecimalFormat, formats a decimal value regardless of locale?