this is the index.jsp
<s:form action="abc" namespace="/test">
<s:textfield name="users[0].name" label="ff"/>
<s:submit />
</s:form>
here is the hello.jsp
<body>
<s:property value="users[0].name" />
</body>
struts.xml
<struts>
<package name="hello" namespace="/test" extends="struts-default">
<action name="abc" class="struts.HelloWorld">
<result>/test/Hello.jsp</result>
</action>
</package>
</struts>
helloworld.class
public class HelloWorld extends ActionSupport {
private String username;
private boolean flag;
private List<User> users;
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users = users;
}
public boolean isFlag() {
return flag;
}
public void setFlag(boolean flag) {
this.flag = flag;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String execute() {
return "success";
}
}
what`s wrong ?