The deprecation is for the nightly build/Struts 1.2 distribution. If you're
using 1.1 (like I am), there's no saveErrors(request, actionMessages) just
yet.
Once you start using 1.2 (or the nightly build), you can use the saveErrors()
that accepts ActionMessages; the one which accepts ActionErrors has been
marked deprecated there.
hth,
Hubert
--- Mark Lowe <[EMAIL PROTECTED]> wrote:
> I was in the same boat, thinking that html:errors tag was up for
> deprecation, but no. Just ActionErrors are, ActionMessages can be
> rendered using html:errors.
>
>
> On 10 Feb 2004, at 17:10, Slattery, Tim - BLS wrote:
>
> >> With Struts 1.1, we have support for both error messages and
> >> non-error messages. We use saveMessages() for non-error and
> >> saveErrors() for error messages. In our JSPs, we can use the
> >> <html:messages> tag to display them:
> >
> > OK, that helps. But can you tell me why I can't use saveErrors with an
> > ActionMessages object?
> >
> > I have something like this:
> >
> > ActionMessage newError = new ActionMessage("error.generic.placeholder",
> > msg);
> > ActionMessages errors = new ActionMessages();
> > errors.add( ActionMessages.GLOBAL_MESSAGE, newError );
> > saveErrors( request, errors );
> >
> > And I get this error message:
> >
> > saveErrors(javax.servlet.http.HttpServletRequest,
> > org.apache.struts.action.ActionErrors) in
> > org.apache.struts.action.Action
> > cannot be applied to (javax.servlet.http.HttpServletRequest,
> > org.apache.struts.action.ActionMessages)
> >
> > According to the javadoc, there's a deprecated saveErrors that takes an
> > ActionErrors object, and a non-deprecated one that takes an
> > ActionMessages
> > object. This message is apparently telling me that the non-deprecated
> > one
> > doesn't exist. I'm using Struts 1.1.
> >
> >
> > --
> > Tim Slattery
> > [EMAIL PROTECTED]
> >
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]