Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a single action a struts application

 
rex tony
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using more than one forms in a single action in a struts application
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Struts it is only possible to have one ActionForm per action mapping. However, it is possible to have many different action mappings point to the same Action class. In order to make this work, you'd have to have a mechanism in place in your Action Class that would enable you to decide how to cast the ActionForm instance that's passed as a parameter to the execute method. Example:

struts-config.xml

TestAction code
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic