Selva
Selva

Reputation: 1670

How to aviod comma in jstl

I use format tag for print decimal value using the below code.

<fmt:formatNumber value="${scoreComponentNormalization.rangeEnd}" maxFractionDigits="1" />

My expected value is:2000

But in prints:2,000

How to avoid the comma.Any help will be greatly appreciated!!!

Upvotes: 4

Views: 2305

Answers (2)

Harshal Patil
Harshal Patil

Reputation: 6759

You need to use no grouping in jstl while formatting

groupingUsed: Whether any grouping separated to be used when formatting the output.

groupingUsed="false"

i.e. <fmt:formatNumber groupingUsed="false" value="${scoreComponentNormalization.rangeEnd}" maxFractionDigits="1" />

Upvotes: 2

user2408578
user2408578

Reputation: 464

Use following in your fmt:formatNumber tag

groupingUsed="false" />

since by default it is true

Upvotes: 10

Related Questions