Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

format a number using JSTL

843838Mar 16 2006 — edited Mar 16 2006
<fmt:formatNumber value="${Form1.map.amount}" type="currency" var="amt"/>

this is returning $10,000,00.00 value.

Want the value 10,000,00.00 i.e without dollar sign. The length of the number might vary.

Similarly,
<fmt:formatNumber value="${Form1.map.interestrate}" type="percent" minFractionDigits="0" maxFractionDigits="2" var="interestrt"/>

is returning 2.45% value.

want the value 2.45 i.e without %.

would like to display the values in the text fields, as I have $ and % symbols before and after the textfield want the formatted value alone.

How can this be done?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2006
Added on Mar 16 2006
1 comment
192 views