What is the general approach in creating action classes for Struts.

At the moment, any given project that I work on seems to have pretty close
to one new Action class for each page.
If the page is at all complicated, has it's own form or data, it seems to
need a separate Action.execute(). In fact, if there's more than one button
on the page, sometimes it makes sense to have more than one Action for that
page.

The result is a lot of classes extending from Action. Now I could, with
difficulty, make a single Action class and then within the execute method
sort according to what page and form accompany the request.

My question is, what's the recommended practice. Is it considered best to
keep different actions for each major purpose or to have one Action
(controller) sorting and dispatching incoming requests.

Reply via email to