Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-05 Thread Narayana S
our container environment. > >> > > >> > You had better post your configuration information; platform, > >> container, > >> > cluster setup? etc. maybe someone on the list can help. > >> > > >> > Here are the relevant lines of code f

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-05 Thread Greg Lindholm
re the relevant lines of code from the interceptor. >> > >> > ActionContext actionContext = invocation.getInvocationContext(); >> > HttpServletRequest request = (HttpServletRequest) >> > actionContext.get(StrutsStatics.HTTP_REQUEST); >> > HttpSession ses

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-04 Thread Nils-Helge Garli Hegvik
etRequest) >> actionContext.get(StrutsStatics.HTTP_REQUEST); >> HttpSession session = request.getSession(false); >> if (session != null) >> { >> ... >> Collection actionMessages = validationAware.getActionMessages(); >> if (actionMessages != null && a

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-04 Thread Mead Lai
(); > > HttpServletRequest request = (HttpServletRequest) > > actionContext.get(StrutsStatics.HTTP_REQUEST); > > HttpSession session = request.getSession(false); > > if (session != null) > > { > > ... > > Collection actionMessages = validationAware.get

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-04 Thread Narayana S
mp;& actionMessages.size() > 0) > { > session.setAttribute(ACTION_MESSAGES_KEY, actionMessages); > } > ... > } > > > > -- > View this message in context: > http://www.nabble.com/-S2--Preserving-messages-across-a-Redirect-in-Struts-2-tp18245061p20322352.html > S

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-04 Thread Greg Lindholm
ribute(ACTION_MESSAGES_KEY, actionMessages); } ... } -- View this message in context: http://www.nabble.com/-S2--Preserving-messages-across-a-Redirect-in-Struts-2-tp18245061p20322352.html Sent from the Struts - User mailing list archive at Nabble.com. --

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-11-04 Thread Narayana S
> of my default stack. > (I don't have a use-case where the fieldErrors would be useful across a > redirect but somebody may and it was easy enough to include them.) > > > -- > View this message in context: > http://www.nabble.com/-S2--Preserving-messages-across-a-Redirect-in-

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-07-07 Thread Greg Lindholm
preserve all messages across a redirect. I have it configured as part of my default stack. (I don't have a use-case where the fieldErrors would be useful across a redirect but somebody may and it was easy enough to include them.) -- View this message in context: http://www.nabble.com/-S2

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-07-06 Thread Chris Pratt
Greg, great work, I'd love to see that replace the store interceptor, I think it's a lot clearer and easier to use. For that matter it could be put in the default stack since it doesn't require any parameters to make it work. Thanks for the post. (*Chris*) On Wed, Jul 2, 2008 at 12:29 PM, Greg

Re: [S2] Preserving messages across a Redirect in Struts 2

2008-07-05 Thread dusty
Messages = > validationAware.getActionMessages(); > if (actionMessages != null && actionMessages.size() > 0) > { > session.setAttribute( > actionMessagesSessionK

[S2] Preserving messages across a Redirect in Struts 2

2008-07-02 Thread Greg Lindholm
Hi All, I took a look at using MessageStoreInterceptor  to preserve messages across a redirect and didn't like what I saw, it's too hard to configure.  So I wrote an Interceptor RedirectMessageInterceptor (included below) that will automatically preserve messages across a redirect or redirectAc