my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "a single action  a struts application" Watch "a single action  a struts application" New topic

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:


TestAction code

Consultant, Sima Solutions
I agree. Here's the link:
subject: a single action a struts application
Similar Threads
Action class instance
Struts 1: Selective Validation of Form
general servlet app arch. question...
how does a single action servlet handles millions of requests at the same time in str