This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Use of form bean name in Action mapping for ActionForward class

 
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?
 
Author
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.
 
Why is the word "abbreviation" so long? And this ad is so short?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic