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 the relevant lines of code from the interceptor.
>> >
>> > ActionContext actionContext = invocation.getInvocationContext();
>> > HttpServletRequest request = (HttpServletRequest)
>> > actionContext.get(StrutsStatics.HTTP_REQUEST);
>> > HttpSession ses
etRequest)
>> actionContext.get(StrutsStatics.HTTP_REQUEST);
>> HttpSession session = request.getSession(false);
>> if (session != null)
>> {
>> ...
>> Collection actionMessages = validationAware.getActionMessages();
>> if (actionMessages != null && a
();
> > HttpServletRequest request = (HttpServletRequest)
> > actionContext.get(StrutsStatics.HTTP_REQUEST);
> > HttpSession session = request.getSession(false);
> > if (session != null)
> > {
> > ...
> > Collection actionMessages = validationAware.get
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
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.
--
> 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-
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
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
Messages =
> validationAware.getActionMessages();
> if (actionMessages != null && actionMessages.size() > 0)
> {
> session.setAttribute(
> actionMessagesSessionK
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
11 matches
Mail list logo