java - Setting default fmt formatNumber maxFractionDigits for all jsp pages -


is possible have following tag display 5 decimal places?

<fmt:formatnumber type="currency" value="${number}" /> 

without having change to

<fmt:formatnumber type="currency" maxfractiondigits="5" value="${number}" /> 

basically have many of these , want them change, want 5 decimal places default.

yes. cam implement extending fmt:formatnumber functionality.

for this, create class extending org.apache.taglibs.standard.tag.rt.fmt.formatnumbertag set maxfractiondigits 5 default (when not supplied).

you need change reference in fmt tag library descriptor (tld) file point own implementation.

these should present in jstl jar located in web-inf\lib default .

edit: personally, go adeel's approach of setting custom locale, if @ possible.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -