Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of form bean name in Action mapping for ActionForward class

 
vijay makam
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic