I used a taglibrary I found on the web to format currency etc. http://coldjava.hypermart.net/servlets/numtag.htm
Alternatively, you can format them as Strings in the Action (if it is for a form bean) using the java.text.NumberFormat classes HTH JC -----Original Message----- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 5:15 PM To: 'Struts Users Mailing List' Subject: RE: Bean Bug? I'd be interested in how you can use ints for decimal numbers. The "right" way is to use BIG_DECIMAL, but I have to use the session bean method given me for my bean data. But this still does not address the issue of the <bean:write> behavior. Mark -----Original Message----- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 6:00 PM First Principle of Economics: ever use float or double for money. Use ints. Or, for serious money, longs. 'The real problem is not the "output" but the whole idea. micael At 05:56 PM 4/30/02 -0400, you wrote: >I'm using a simple <bean:write name="phone" property="price" /> which grabs >a float price from the form bean. The display, however, is unpredictable. >For a price of 25.00, e.g., can get returns of "25.00," "25.0" and "25." >Anybody else experiencing this behavior? I've had to wrap the <bean:write> >with JavaScript to get the formatting correct. > >Mark >"De recta non tolerandum sunt." > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>