Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic

how to generate dynamic hidden vars to send data from jsp page

Praveen palukuri
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Report post to moderator
this is praveen, now i've one problem before me.
i'm displaying some data in a table using beans(struts)now i want to send this to Action class(struts) for this i need to create dynamic variables. but i'm unable to create dynamic hidden vars to take the data in Action class.
pls help me.
my code follows: in Jsp

<% int cnt = 11;%>
<logic:iterate id="crite" name="reportcriteria">
<td align="left" ><bean:write name="crite" property="infld" /></td>
<td align="left"><bean:write name="crite" property="conval" /></td>
<input type="hidden" name="infld"+<%=cnt%>
value=<bean:write name="crite" property="infld" /> />
<% cnt++; %>

In Action class


this is the code it's not working.i'm getting null values.
Bear Bibeault
Author and ninkuma
Posts: 65276
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
    Bookmark Topic Watch Topic
  • New Topic