Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to send multiple value in Struts?

Status
Not open for further replies.

satellite03

IS-IT--Management
Dec 26, 2003
248
0
0
IN
how Struts send multiple values ?

say i have data like

<html:txt property="name" />
<html:txt property="name" />
<html:txt property="name" /> // all having "name" property
<html:txt property="name" />


say i have all these text boxes. i want to post all these .

how can i send it ?

It is called Struts follows indexed property . i visited apache site but not sure how to implement for like this type of problem.

how can i retrieve values inside Action class ? what exactly should i write in the struts-config file ?

can anybody tell me the layout how to send multiple value in Struts?

thank you

 
In your Action From, define the field type as String[]. e.g. in your action form class:

Code:
....

private String[] names;

public String[] getName() { return names; }
public void setName(String[] names) { this.names = names; }


......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top