Hi Smita,
See following sample code for logic:iterate tag .....
<logic:notEmpty name="InchargeListForm" property="arrayInchargeList" >
<table width="100%" border="1" cellpadding="1" >
<tr>
<td>InchargeCode</td>
<td>InchargeName</td>
</tr>
<logic:iterate id="InchargeVO" name="InchargeListForm" property="arrayInchargeList" scope="request" >
<tr>
<td><bean:write name="InchargeVO" property="inchargeCode"/></td>
<td><bean:write name="InchargeVO" property="inchargeName"/></td>
</tr>
</logic:iterate>
</table>
</logic:notEmpty>
In the above sample I have an ArrayList defines as arrayInchargeList in my form. In my ActionServlet I add InchargeVO[Value object].
Lemme know if this what you wanted to know
OR
Do you need to extract the column name from a table? In that case u need to use meta data.
-Rohit
Hey smita ..do u forget to award the duke dollars for ur questions or u dontwanna give it anyways?
If thats the case then stop assigning duke dollars in future post.
Anyways duke dollars there or not..people still do reply.
By the way u never replied on my earlier reply too ..
http://forum.java.sun.com/thread.jspa?threadID=754972&messageID=4313844#4313844
Guys u shud see this post on Jguru site too ..lol
http://www.jguru.com/forums/view.jsp?EID=1306466
Hi Smita,
Nice to know that ur in US. I am in Japan[Tokyo] right now.
I guess now why there is a time lag in our replies.
FYI ...My email :rohitk2000@gmail.com
Ok.. within the <logic:iterate .. tag you need to add bean:define tag as below :
><logic:notEmpty name="InchargeListForm" property="arrayInchargeList" >
<table width="100%" border="1" cellpadding="1" >
<tr>
<td>InchargeCode</td>
<td>InchargeName</td>
</tr>
<%
int cnt = 0;
%>
<logic:iterate id="InchargeVO" name="InchargeListForm" property="arrayInchargeList" scope="request" >
<bean:define id='inchargeCode' name="InchargeVO" property="inchargeCode" />
<%
cnt = cnt+Integer.parseInt(inchargeCode);
%>
<tr>
<td><bean:write name="InchargeVO" property="inchargeCode"/></td>
<td><bean:write name="InchargeVO" property="inchargeName"/></td>
</tr>
</logic:iterate>
</table>
</logic:notEmpty>
TOTAL :<%=cnt%>
Lemme know if this solves your question.
Aletrnatively you may use <c:set .. tag in JSTL
Regards
Rohit
>