File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes can anybody answer my question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "can anybody answer my question" Watch "can anybody answer my question" New topic

can anybody answer my question

Manuel Schenkhuizen

Joined: Apr 20, 2011
Posts: 14
this is the index.jsp

<s:form action="abc" namespace="/test">
<s:textfield name="users[0].name" label="ff"/>
<s:submit />

here is the hello.jsp

<s:property value="users[0].name" />


<package name="hello" namespace="/test" extends="struts-default">
<action name="abc" class="struts.HelloWorld">


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 ?
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Welcome to the JavaRanch.

wifm wifmmm wrote:
what`s wrong ?

I have no idea. What happens when you run it? How does that differ from what you expect?

[How To Ask Questions On JavaRanch]
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Hi friend,

Can you please post your User class and the error what you are getting at console.

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Manuel Schenkhuizen

Joined: Apr 20, 2011
Posts: 14
The problem has been resolved.
I wrote the user class and the helloworld class in the same class file,maybe this is what struts cann`t allow.
Consider Paul's rocket mass heater.
subject: can anybody answer my question
It's not a secret anymore!