Abhendra Singh
Abhendra Singh

Reputation: 1957

Parse Decimal to Integer in JSTL

Is there any way to parse decimal number to integer in JSTL, if it contains zero after decimal.

For example I want to parse 56.00 => 56 but 56.23 should remain 56.23

I tried fmt:parseNumber but it parse all type of decimal number.

Upvotes: 0

Views: 1490

Answers (1)

Abhendra Singh
Abhendra Singh

Reputation: 1957

I found solution. fmt:formatNumber worked for me.

<fmt:formatNumber type="number" groupingUsed="false" value="152.00" />

Upvotes: 1

Related Questions