|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to do Money mask on JSP page ?
In a Bean i have some this like this:
public vector getIncomeReport(){ conn sql statement while(rs.next()){ incomeReports.frBeginningBalance = rs.getDouble(1); } so i am getting the Amount value from the Oracle DB as getDouble, but actually in Oracle Column the value is something like this: 29383060.16 but on the JSP page it display as : 2.93830602E7. so How to get the money mask on the JSP page: like: 2,93,83,060.16 Any help greatly appreciated. Thanks in advance. |
|
#2
|
|||
|
|||
|
Try using getString() instead of getDouble(). If that returns the results you want, then you can convert the string to a Double.
__________________
-james |
|
#3
|
|||
|
|||
|
Try looking into NumberFormat.getCurrencyInstance(). It is a static method that returns a NumberFormat object used to format numbers to their currency string, complete with dollar signs.
http://java.sun.com/j2se/1.4/docs/a...mberFormat.html |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > How to do Money mask on JSP page ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|