DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36328>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36328 Summary: fmt:formatNumber ignores maxFractionDigits Product: Taglibs Version: 1.1 Platform: All URL: http://webtuitive.com/samples/locale.jsp OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Standard Taglib AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] In the absence of an explicit locale setting, fmt:formatNumber ignores the maxFractionDigits attribute. Test case: -------------------------------------------------------------------- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <c:set var="someCount" value="61"/> <c:set var="counter1"> <fmt:formatNumber type="number" maxFractionDigits="0" value="${ someCount / 3 }"/></c:set> ${counter1} | <fmt:setLocale value="en_US"/> <c:set var="counter2"> <fmt:formatNumber type="number" maxFractionDigits="0" value="${ someCount / 3 }"/></c:set> ${counter2} -------------------------------------------------------------------- Most browsers will show 20 | 20 but user-agents not providing a Locale via an Accept-Language header like wget (and Amaya) retrieve 20.333333333333332 | 20 If I manually add a header to wget, e.g. wget --header='Accept-Language: en-us,en' then the result is '20 | 20' demonstration environment: Sun JDK 1.5.0_03 and JSTL 1.1.2 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
