wood burning stoves 2.0*
The moose likes Portals and Portlets and the fly likes float value gets roundedoff in portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "float value gets roundedoff in portlet" Watch "float value gets roundedoff in portlet" New topic
Author

float value gets roundedoff in portlet

daitkarsachin paatil
Greenhorn

Joined: Apr 07, 2010
Posts: 9
Hi all,
I am developing a portlet application which will show my database table("OrderData") to the user.
to accomplish this i am retrieving all the table rows and adding them to a HashTable(HashTable<String ,String>).There are some columns in my table which are of float datatype e.g price. I am getting price from the result set as getDouble and then converting it to string to strore it into hashtable.

When i run my application,it works fine and shows all the table data to the user,but after some time(after 1-2 hours) when database table grows my price field gets truncated on screen and shows invalid values. If i restart my Server(jetspeed) then problem gets resolved but reoccurs after 1-2 hours.

Is anybody have idea about this problem ?

Thanks
Sachin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: float value gets roundedoff in portlet