Re: fmt:formatNumber not formatting on first page load
Stephen Souness <[email protected]>
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
Windows XP Professional is the OS that this app has encountered this issue on. We'll be deploying it to a Linux box when it goes live, and my tests today indicate that everything goes fine first time under Linux (for that particular aspect at least - let's not tempt Murphy to invoke the law). -- Stephen Rahul Akolkar wrote: > On 2/2/06, Stephen Souness <[email protected]> wrote: > >>More info: >> >>- the value is a string along the lines of : >>165000.0 >> >>So what I would expect to happen is: >> - the decimal point and fractional 0 to be truncated >> - a '$' symbol to be pre-pended >> - a ',' between the '5' and the first '0' indicating thousands >> >>Each time Tomcat is restarted, the first load of the page shows: >> >>165000.0 >> >>subsequent page loads give the correct: >> >>$165,000 >> > > <snip/> > > On Tomcat 5.0.28, JDK 1.4.2, JSTL 1.1, this JSP: > > <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> > <fmt:formatNumber value="165000.0" type="currency" > currencySymbol="$" maxFractionDigits="0" /> > > give me this output: > > $165,000 > > The first time, and every time beyond that. There's something else > going on in your setup. I can't say based on the information we have. > > -Rahul > > > >>-- >>Stephen >> > > <snap/>