Re: How to format number

2003-10-07 Thread Boris Folgmann
Lee Chin Khiong wrote: How to format a double in JSP or java ? for example : 10/3=3.3 I want to format it to 3.33. Try realToString(3.33, 2) with this: /** Convert a float to a string with fixed number of fraction digits */ public static String

Re: How to format number

2003-10-07 Thread Lawence
There are some non-standard nice library classes you can use for this purpose. Just google it. These classes enable you to format things like you are working with c/c++. Lee Chin Khiong [EMAIL PROTECTED] wrote: How to format a double in JSP or java ? for example : 10/3=3.3 I

Re: How to format number

2003-10-07 Thread Mark Lenz
Users List [EMAIL PROTECTED] | | cc: | | Subject: Re: How to format number

RE: How to format number

2003-10-07 Thread Zhang, Hong
PROTECTED] Sent: Tuesday, October 07, 2003 11:44 AM To: Tomcat Users List Subject: Re: How to format number There are some non-standard nice library classes you can use for this purpose. Just google it. These classes enable you to format things like you are working with c/c++. Lee Chin Khiong

Re: RE: How to format number

2003-10-07 Thread budi
In JSP, the easiest is to use the formatNumber tag of the JSTL I18N library. For example, the following JSP page: lt;%@ taglib uri=quot;http://java.sun.com/jsp/jstl/fmtquot; prefix=quot;fmtquot; %gt; lt;fmt:formatNumber value=quot;0.3quot; maxFractionDigits=quot;2quot;/gt; lt;br/gt;

How to format number

2003-10-06 Thread Lee Chin Khiong
How to format a double in JSP or java ? for example : 10/3=3.3 I want to format it to 3.33.

Re: How to format number

2003-10-06 Thread Paul Gregoire
number How to format a double in JSP or java ? for example : 10/3=3.3 I want to format it to 3.33. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]