• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts 2 actionforms

 
viju vi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
Can anyone help me on how to map beans to action class. please let me know on this...
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<form-bean
name="nameForm"
type="example.NameForm"
/>


<action path="/Name" type="example.NameAction" name="nameForm" input="/index.jsp">
<forward name="success" path="/displayname.jsp"/>
<forward name="failure" path="/index.jsp"/>
</action>


or just have a look.
http://www.allapplabs.com/struts/struts_example.htm

Cheers
Dhana
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 does not use ActionForms. The paradigm in Struts 2 is that the Action class itself acts as both Action and ActionForm. Any input fields on the JSP should have corresponding properties on the Action class. Once you've been through some basic Struts 2 tutorials, you'll understand this new paradigm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic