commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Paul" <>
Subject [Beanutils] Problem with RowSetDynaClass when field have 3 decimal part.
Date Thu, 22 Jan 2004 12:10:00 GMT
    I am using RowSetDynaClass to carry data to JSP. If the field is a
number field and it have 3 digits after decimal it is printing 4 digits the
last one being 0. For eg. instead of printing 1.256 it will print 1.2560.
Please suggest a way so that it won't affect other datatypes this is because
I am using a custom tag to print values in all pages.  I am doing this.

ResultSet rs = pstmt.executeQuery();
RowSetDynaClass rsdc = new RowSetDynaClass(rs);
List   list = rsdc.getRows();


DynaBean data = (DynaBean)list.get(0);

Here 1.56 prints Ok while 1.562 prints as 1.5620.

This is with JDK 1.4.1, Oracle 8.1.7. The field type is number(13,3).

Hope this information is enough.
Antony Paul

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message