Of course.  If you want a bean created and to put it into some
specific scope, your form is the place to do it.  You can use other
methods of course.

On 5/25/06, Chaudhary, Harsh <[EMAIL PROTECTED]> wrote:
Isn't that what Struts forms do out of thye box.

Harsh.

-----Original Message-----
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 3:29 AM
To: Struts User List
Subject: How can I pass all the request parameters into a bean ?


Hello,

How can I pass all the request parameters into a bean ?

For example:

class User {
    private int id;
    private String name;
    private String sex;
    private Dat birth;
    private boolean status;
}


How can I set all the request parameters into the User if those
parameters name contains any (id, name, sex, birth and status) ?


The utility prototype :

public Object getFormBean(Class formClass, HttpServletRequest request) {


}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to