On Mon, 23 Apr 2001, Nanduri, Amarnath wrote:
> One thing you can do is use a <meta> tag which contains the name of the jsp
> page. When you submit to the same action, and when you want to show errors
> to the input page, get this value out of the <meta> tag and forward to that
> page.
>
> I would strongly suggest you use a separate action class for every jsp .
> That way it woule be easier to maintain and debug.
> If you think all the pages perform almost the same action(s) i would suggest
> you use an inheritance mechanism.
>
You can actually have it both ways ...
It is entirely legal to have more than one <action> element that uses the
same Action class for the "type" attribute. Then, you still get the
benefits of having all the code in one place, but you can also configure
the "input" attribute of each <action> individually.
If you do this, the standard validation performed by Struts will return to
the corret input page, *and* you can do so programmatically from within
the common Action by saying:
String inputPath = mapping.getInput();
return (new ActionForward(inputPath));
> cheers,
> Amar..
>
Craig