struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aladin Alaily" <str...@aladin.ca>
Subject RE: Struts 1.2.7
Date Wed, 18 May 2005 16:08:34 GMT
Maybe I should have... although the solution provided in 1.2.7 is much
more extensive.  They seem to have modified Action, ActionMessages, and
RequestProcessor.

My solution solved the problem with an external class (with a method
called saveErrors(HttpSession session, ActionMessages messages)) and with
an entry in the processPreprocess() method.

I much prefer to have the whole thing integrated in struts... rather than
relying on external classes and customizing the controller.

In any case, for the benefit of others, here is my processPrepocess() method:

protected final boolean processPreprocess(HttpServletRequest request,
            HttpServletResponse response) {

        HttpSession session = request.getSession(false);

        ActionMessages errors =
            (ActionMessages) session.getAttribute(Globals.ERROR_KEY);

        if (errors != null) {
            session.removeAttribute(Globals.ERROR_KEY);
            ActionTools.getInstance().saveErrors(request, errors);
        }


        ActionMessages messages =
            (ActionMessages) session.getAttribute(Globals.MESSAGE_KEY);

        if (messages != null) {
            session.removeAttribute(Globals.MESSAGE_KEY);
            ActionTools.getInstance().saveMessages(request, messages);
        }
        return true;

    }



> Aladin, perhaps your hack could have been contributed sooner!! :-) 1.2.7
> has
> been held up along time .. It's about time it's coming out.
>
> -----Original Message-----
> From: Aladin Alaily [mailto:struts@aladin.ca]
> Sent: Wednesday, May 18, 2005 10:54 AM
> To: Struts Users Mailing List
> Subject: Struts 1.2.7
>
>
> Hi Everyone,
>
> I was just curious if anyone has been using struts v. 1.2.7?
>
> If so, what do you think of the new features?  Personally, I think that
> being able to save the errors in the session is a great addition (I wrote
> a hack for v. 1.2.4 to do exactly that).
>
>
> Thanks,
> Aladin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
> ------------------------------------------------------------------------------
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates (which may be known outside the
> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
> Banyu) that may be confidential, proprietary copyrighted and/or legally
> privileged. It is intended solely for the use of the individual or entity
> named on this message.  If you are not the intended recipient, and have
> received this message in error, please notify us immediately by reply
> e-mail and then delete it from your system.
> ------------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message