You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cu...@finntech.no on 2007/10/25 11:02:16 UTC
struts2 actionerror & actionmessage
I have this actions in the same namespace:
<action name="doThing" class="doThingAction">
<result>example1.jsp</result>
</action>
<action name="add" class=" doThingAction " method="add">
<result type="redirect-action" name="success">
<param name="actionName">doThing</param>
</result>
</action>
In a jsp file a form have a action="add" and in the action
class(doThingAction.java) I add a message to actionmessage. The problem
here is the value are not store on the action that it rederected
to(<action name="doThing" class="doThingAction">). How can I get the
message that I added to on the first action? Help plz.....
CvT
Re: struts2 actionerror & actionmessage
Posted by Igor Vlasov <vi...@mail.ru>.
Try to use <result name="success" type="chain" >doThing</result>
This will invoke ChainInterceptor that wiil copy SIMILAR(by name and type)
objects in both actions. And error mesages also.
Please, look at ChainInterceptor source.
cuong.van.truong wrote:
>
> I have this actions in the same namespace:
>
> <action name="doThing" class="doThingAction">
>
> <result>example1.jsp</result>
>
> </action>
>
> <action name="add" class=" doThingAction " method="add">
>
> <result type="redirect-action" name="success">
>
> doThing
>
> </result>
>
> </action>
>
>
>
> In a jsp file a form have a action="add" and in the action
> class(doThingAction.java) I add a message to actionmessage. The problem
> here is the value are not store on the action that it rederected
> to(<action name="doThing" class="doThingAction">). How can I get the
> message that I added to on the first action? Help plz.....
>
>
>
>
>
> CvT
>
>
>
--
View this message in context: http://www.nabble.com/struts2-actionerror---actionmessage-tf4689452.html#a13421841
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org