Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To get indexed property value defined in html:text inside action class

 
kannan coding
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp which has html:text boxes which are indexed. When the user enters some value in the text box how to get those values in the action class of struts.
for example:
<logic:iterate id="XXX">
<html:text name="XXX" property="YYY" indexed="true"/>
</logic:iterate>

Now i need to access the value of this indexed html:text inside my action class

public class action extends Action{
???
}
and also the getter and setter method's for the property "YYY"

Kindly help me in this.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will find the answer to this question by reading question 6 of our Struts FAQ. This has a working example of using indexed properties in a Struts 1 application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic