aspose file tools*
The moose likes Struts and the fly likes a single action  a struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "a single action  a struts application" Watch "a single action  a struts application" New topic
Author

a single action a struts application

rex tony
Ranch Hand

Joined: Aug 29, 2007
Posts: 159
Using more than one forms in a single action in a struts application
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a single action a struts application