• Post Reply Bookmark Topic Watch Topic
  • New Topic

Submit form text fields (group) with same name!!!  RSS feed

Moniphal Say
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am new to Structs,I've just use it last 2 weeks, now i found some problem which is simarly to Girish Varde posted last month(july 09, 2004 5:49 AM). My question is :
I want to display identical text fields in a form which should be as many as required, decided dynamically.
I use logic:iterate to iterate over my list of informations and I have put some input:text for each iterate.
How can I take a group of value of text fields with same name?

I've saw the reply of Marc Peabody and Srikanth Shenoy to Girish Varde, and I've try with that code but it still doesn't work.

Here is my code in the JSP page :

<% int counter=0; %>
<logic:iterate id="indexInfo" name="indexInfoList">
<c:when test="${indexInfo.dataType !='2'}">
Enter the string please :
<html:text indexed="true" property='<%= "indexValue[" + counter++ + "]" %>'/>
<c therwise>
Enter the number please :
<html:text indexed="true" property='<%= "indexValue[" + counter++ + "]" %>'/>
</c therwise>


And this is my action Form:

private String[] indexValue = new String[0];

public String[] getIndexValue() {
return indexValue;

public void setIndexValue(String[] strings) {
indexValue = strings;

But it is doesnt work since my JSP page.

The error message is :

java.lang.reflect.Array.get(Native Method)

So please help me to solve this problem !!!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!