views:

149

answers:

1

Hello All,

I am developing a web application using Struts 1.2.7

I want to print a list of integers using the tag. I searched and found that the format attribute is used to print the desired result but was unsuccessful.

What should I pass as the value in format to print 3 digit integers/floating point numbers. The code sample is as follows:

<logic:iterate name="intList" id="integer" >
   <bean:write name="integer" />
<logic:iterate />

Here intList is a List of int(s) passed as a request attribute to the jsp page under consideration.

A: 

I believe this should work:

<bean:write name="integer" format="0.000" />
Tommi