• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Use of form bean name in Action mapping for ActionForward class

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic