This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes how to generate dynamic hidden variables to send data from jsp to Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to generate dynamic hidden variables to send data from jsp to Action class" Watch "how to generate dynamic hidden variables to send data from jsp to Action class" New topic
Author

how to generate dynamic hidden variables to send data from jsp to Action class

Praveen palukuri
Ranch Hand

Joined: Feb 10, 2005
Posts: 65
hi,
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">
<tr>
<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" /> />
</tr>
<% cnt++; %>
</logic:iterate>

In Action class

System.out.println("infld11:"+request.getParameter("infld11"));
System.out.println("infld12:"+request.getParameter("infld12"));

this is the code it's not working.i'm getting null values.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to generate dynamic hidden variables to send data from jsp to Action class
 
Similar Threads
how to generate dynamic hidden vars to send data from jsp to action class
how to generate dynamic hidden vars to send data from jsp page
Setting value of java variable to hidden field
using ajax and struts iterate tags
getting value in logic iterate