> In Struts 1.2.4 it slightly simpler... > > // do authentication > boolean authentic = authenticate(); > if (!authentic) { > getErrors(request).add("logon", new > ActionError("authenticate.error"); > return getInputForward(); > }
Surely you meant: new ActionMessage("authenticate.error"); // ;-) Anyway, does it make sense to have something like this: saveError(request, errorsKey, messageKey) I usually end up adding that to a "BaseAction" in each project, but maybe it doesn't belong in Action, per se. While I'm at it, other common methods that don't necessarily belong to Action, but are common enough to be in Struts somewhere: (IMO, obviously) getInt(request, attributeName); // and other common types, Date, Integer, Long ... Interesting that Struts lacks probably the first Servlet utility ever. Or am I missing something? getInteger(form, property); // handle all ActionForm and DynaActionForm These are fairly common I would think, but perhaps not common enough to go into Action. - Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]