there are two ways to do this
you can use the built-in BigDecimal function
myBigDecimal.SetScale(2, RoundingMode.HALF_UP);
This returns a large decmial with 2 digits per decimal and also rounds up (there are other rounding methods)
OR
you can use jsf convertNumber tag
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
source share