aspose file tools*
The moose likes Struts and the fly likes Use of  form bean name in Action mapping for ActionForward class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Use of  form bean name in Action mapping for ActionForward class" Watch "Use of  form bean name in Action mapping for ActionForward class" New topic
Author

Use of form bean name in Action mapping for ActionForward class

vijay makam
Ranch Hand

Joined: Sep 06, 2008
Posts: 31
Hi All,

What is the use of name attribute in the Action Mapping for struts built in ActionForward.

If I have a mapping as below
<action path="/login"
type="org.apache.struts.actions.ForwardAction"
input="/login.jsp"
parameter="/login.jsp"
name="LoginForm"
scope="session">
</action>


will the form be available to the login.jsp so that I can use reset() method of the action form to pre populate some data in login.jsp?


Regards,
vijay
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What is the use of name attribute in the Action Mapping for struts built in ActionForward.

The "name" attribute defines the form used by the action.
will the form be available to the login.jsp so that I can use reset() method of the action form to pre populate some data in login.jsp?

Yes, that is the point of form beans: they're used by the Struts 1 form tags to capture and display form data.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Use of form bean name in Action mapping for ActionForward class