wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
wood burning stoves
 
subject: Use of form bean name in Action mapping for ActionForward class
 
Similar Threads
Errata : ActionForward
Actionforward Problem
Not able to see the errors on JSP
help with module level struts config
Error: DispatchMapping[/login] does not define a handler property