what ive done is(in short) in my servlet class--->
Expand|Select|Wrap|Line Numbers
- ArrayList<String> list=new ArrayList<String>();
- while(resultset.next())
- {
- s4 = resultset.getString("Publicity_Head");
- list.add(s4);
- s5 = resultset.getString("Budget_Alloted");
- list.add(s5);
- s6 = resultset.getString("Work_In_Progress");
- httpservletrequest.setAttribute("s6", s6);
- list.add(s6);
- s7 = resultset.getString("Amount_Paid");
- list.add(s7);
- httpservletrequest.setAttribute("list",list);
- }
[HTML]
<tr>
<td width=25%>
<logic:iterate id="s4" name="list" scope="request">
<small>
<font face="Tahoma"> <bean:write name="s4"/> </font>
</small>
</logic:iterate>
</td>
<td width=25%>
<logic:iterate id="s5" name="list" scope="request">
<small>
<font face="Tahoma"> <bean:write name="s5"/> </font>
</small>
</logic:iterate>
</td>
<td width=25%>
<logic:iterate id="s6" name="list" scope="request">
<small>
<font face="Tahoma"> <bean:write name="s6"/> </font>
</small>
</logic:iterate>
</td>
<td width=25%>
<logic:iterate id="s7" name="list" scope="request">
<small>
<font face="Tahoma"> <bean:write name="s7"/> </font>
</small>
</logic:iterate>
</td>
</tr>
[/HTML]
as you can see ive used logic iterate tags to iterate and then print it using <bean:write> tag ,the output that im getting i pretty vague i.e inside each <td> tag when for ex-if i take publicity_code then only the value of publicity_code should be shown in that particular regiion, currently its showing me the values of all the 4 rows in the publicity_code,this is happening to all the columns present.all i want is to display the values of a particular column and no other columns value inside it.why is it happening?i hope ive conveyed the message right!.
regards,
ajos