A bit new to all this, only on my 2nd project. Both projects were already in progress so I haven't had to start from scratch (a good thing and a bad thing). I do recall on the 1st project that within the Action classes the methods names were = a parameter(action) set in the form. My current project has one method, 'doExecute' and then has to have a bunch of if's checking the value of 'action'.
How was this done? (can you point me to a good web site or book)
A good way to handle this is to start by making each task you want to achieve into a seperate action class. You then register each of the action classes with a particular forward in the struts-config.xml file. If you need a decent 'getting started' struts reference, check out 'Programming Jakarta Struts' by Chuck Cavaness.
For multiple actions that relate to the same business objects or some other logical construct, you may want to consider using the DispatchAction class. It will execute different methods based on a predefined attribute name. Simply set that name to the same as a hidden field in your form and when you submit you'lll have all of th eprocessing done without having to nest 26 if statements.
That's the one... DispatchAction.
Your reward shall be in heaven ('cause it sure as hell ain't gonna be here ;-)
(thanx to paul also)
Shucks, I was hoping for some popcorn.