tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: fmt:formatNumber not formatting on first page load
Date Fri, 03 Feb 2006 02:55:10 GMT
On 2/2/06, Stephen Souness <sounie@hotmail.com> 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/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message