File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Format a int in a decimal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Format a int in a decimal" Watch "Format a int in a decimal" New topic

Format a int in a decimal

Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
i have a integer for example 12345.
In my JSP i have to render this value as 123,45

I have to use the struts beans:
<bean:write name="ratingBean" property="importoCapitaleF" format="#,###.##"/>
but i cannot do it..

Someone can help me?

bye, <br />Marco
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61760

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
What do you mean by "I cannot do it"? What happens when you try the above code?

Consultant, Sima Solutions
It is sorta covered in the JavaRanch Style Guide.
subject: Format a int in a decimal