HI,
 
When we want to pass an object or collection of objects to jsp we use value
object or collection of them. 
For example imagine there is an action that wants to retrieve a list of
users from database and send it to jsp.
Here is the code of action:
 
UserListAction
{
execute()
{
        //connect to database();
        //execute the select statement();
        //Get result set
        Vector vecUsers = new Vector();
for size of result
{
                    User aUser = new User; 
                    aUser.setName( rs.get("username"));
                    aUser.setFamily( rs.get("family"));
                    .....
                    vecUser.add(aUser);
        }
        request.setPropertie("allUsers", vecUser)
}
 
}
 
Then in the jsp we use logic:iterate tag to navigate. 
The only problem that we found is defining a value object named User, for
data transfer for each page. Is there any way that we can use the
dynamicForms or dynamic beans for passing data from action to jsp? Is it a
good solution any way?
 
Most of users use dynaForms are used for passing parameter from jsp to
actions. Is it correct? Is there other usages of dynaForms?
 
Thanks

Reply via email to