That's the way I do it. If your Actions are light, as they should be, it doesn't add a lot of code. Some redundant code is not a bad thing, it can make things clearer. If you were to "chain" actions, then you'd be going through the entire request processor chain again.

I think that Struts 1.3, with chain of responsibility implementation, should allow chaining of actions without causing redundant processing, but I can't say for sure (at least I hope it does).

Erik


Yen wrote:

Hi,

I have an action which save the data into the database, after the saving, I would like to forward to the listing page, where I have another action doing the listing.

Should I repeat the same listing method (method list) in the save action itself..? Or, is there any better way?

Thanks for advanced.

rgds,
Yen

public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
method save..
method list..
return (mapping.findForward("afflist"));
}


public ActionForward listing(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
method list
return (mapping.findForward("afflist"));
}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to