jQuery in Action, 3rd edition
The moose likes Struts and the fly likes populating Action Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "populating Action Form" Watch "populating Action Form" New topic

populating Action Form

simmi kamal

Joined: Sep 07, 2007
Posts: 17
Hi all,

I am new to Struts, can anyone help me out as to
How I can populate the Action Form's property with the value from the JSP in the Action class.

I have the following code in the JSP

and i have the property roleName in the Action Form which i want to set wih the value of varRoleName in the above function in the JSP.

How can I achieve this in the ACtion class ???

In the struts_config file I have given the <
input="the above jsp"
name="name of the Action Form"
type="the action class"

Thanks a lot.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I am pretty sure that case must match between your form and the parameters on the url. So if your form has a property roleId with a method setRoleId then the url should use "roleId". Struts will take care of populating the values in your form.

- Brent
simmi kamal

Joined: Sep 07, 2007
Posts: 17
Thanks Brent.
I agree. Here's the link: http://aspose.com/file-tools
subject: populating Action Form
It's not a secret anymore!