The interceptor mention is nothing but
RedirectMessageInterceptor(http://glindholm.wordpress.com/category/struts-2/)
and I specified that in the strust.xml,
This interceptor is to preserve the error messages.
<interceptors>
<interceptor name="redirectMessage"
class="com.interceptor.RedirectMessageInterceptor" />
<interceptor-stack name="redirectInput">
<interceptor-ref name="redirectMessage" />
<interceptor-ref
name="paramsPrepareParamsStack" />
</interceptor-stack>
</interceptors>
I am iterating the session in the JSP and displaying the error messages..
<s:if test="#session.RedirectMessageInterceptor_FieldErrors != null">
<ul>
<s:iterator value="#session.RedirectMessageInterceptor_FieldErrors" >
<s:iterator id="id" value="value" >
<li><s:property value="id" /></li>
</s:iterator>
</s:iterator>
</ul>
<%
session.removeAttribute("RedirectMessageInterceptor_FieldErrors");
%>
</s:if>
As I said my first attempt was to use Chain , but It was not working.
And I don't understand what Dale is saying , can you elaborate please.
Dale -- you mean to say chain and interceptor doesnot go together. !! -:(
Thanks
Siddiq.
DNewfield wrote:
>
> Greg Lindholm wrote:
>> The only other thing is your interceptor stack 'redirectInput' you
>> haven't
>> shown what it is.
>
> And note--specifying any interceptor(s) in the action causes the
> specified interceptor(s) to be the only ones used.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/Preserving-Messages-and-Garbage-values-Across-a-Redirect-in-Struts-2-tp26114968p26134455.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]