public class Controller implements Serializable
{
private Admin[] users;
private String[] names;
public String[] getNames() {
names = new String[] {"Joseph", "Lawson", "Shylet", "Norest"};
return names;
}
public Admin[] getUsers()
{
List<Admin> usersList = retrieve();
users = new Admin[usersList.size()];
int z = 0;
for(int i = 0; i < usersList.size(); i++)
{
users[i] = new Admin();
String id = usersList.get(i).getId();
String password = usersList.get(i).getPassword();
users[i].setId(id);
users[i].setPassword(password);
}
return users;
}
}
I have succesfully used jstl to loop through the string and display them on my jsp page, but I can't seem to do the same thing on my users array. I wonder what i am missing, I checked so much documentation but I can't seem to see examples on JavaBeans retrieving user defined array objects. Thanks for your help