检索struts2中多个操作类的操作消息

检索struts2中多个操作类的操作消息,struts2,Struts2,我正在使用struts2和hibernate开发一个java项目 我有一个超级动作类名为ProjAction,在项目管理中,每个事件都会遇到主超级类。 我有一个子action类将其命名为saveDataAction,在保存数据后,它将进入超级action类并给出结果。 因此,对于超级动作类,我可以使用struts2配置文件中的storeinterceptor来显示动作消息,以获得相应的动作类结果。我已将操作模式用作“自动” 现在为了避免刷新问题,我有一个操作类名为ProjRedirectActi

我正在使用struts2和hibernate开发一个java项目 我有一个超级动作类名为ProjAction,在项目管理中,每个事件都会遇到主超级类。 我有一个子action类将其命名为saveDataAction,在保存数据后,它将进入超级action类并给出结果。 因此,对于超级动作类,我可以使用struts2配置文件中的storeinterceptor来显示动作消息,以获得相应的动作类结果。我已将操作模式用作“自动”

现在为了避免刷新问题,我有一个操作类名为ProjRedirectAction。因此,在这个action类中,我无法在保存数据后显示/检索操作消息

有人能告诉我如何使用store interceptor访问ProjRedirectAction类中的操作消息吗。或者,是否有任何方法向struts2的多个动作类显示动作消息

    public class SuperAction extends ActionSupport {
    public String getData() {
    //implementation for showing the data in the jsp page
    //the result is always redirect to some default.jsp
    return SUCCESS;
    }
    //private method which accessed by its child class for redirecting to superclass
   public String nextCall() {
   //few implementation done after that it calls the getData() method
   return getData();
   }
   }

//Child Class implementaion for ex saving records in db
public class ChildAction extends SuperAction {
public String saveData() {
//saving data to db and then calling the return nextCall method of superACtion class
return nextCall();
}
}
//之前我有过这个实现,在我的项目中再添加一个action类的原因是为了避免刷新问题。刷新时,将相同的值插入到DB中,所以我添加了一个名为RedirectAction的action类

//重定向操作类实现

public class RedirectAction {
public String execute() {
//this method is having same implementation as the method getData() of SuperAction class includes
return SUCCESS;
}
}
//struts.xml配置

<package name="default" extends="struts-default" namespace="/">
//SuperACtion class result
<action name="*Super" method="{1}" class="com.action.SuperAction">
<interceptor-ref name="store">
<param name="operationMode">AUTOMATIC</param>
</interceptor-ref>
<result name="SUCCESS" type="redirectAction">executeRedirect</result>
</action>

//ChildACtion class result
<action name="*Child" method="{1}" class="com.action.ChildAction">
<interceptor-ref name="store">
<param name="operationMode">AUTOMATIC</param>
</interceptor-ref>
<result name="SUCCESS" type="redirectAction">executeRedirect</result>
</action>

//RedirectACtion class result
<action name="*Redirect" method="{1}" class="com.action.RedirectAction">
<interceptor-ref name="store">
<param name="operationMode">AUTOMATIC</param>
</interceptor-ref>
<result name="SUCCESS" type="tiles">Default.jsp</result>
</action>
这个问题我没有找到任何解决办法,任何帮助都是值得的
谢谢您

显示您的代码和操作配置。@AleksandrM我已经添加了上述代码,如果您有任何疑问,请检查并告知我。我没有找到任何解决这种问题的方法。您的配置中没有存储拦截器。配置中没有ExecuteDirect操作。不要弄乱默认值->struts.xml中的SUCCESS应该是SUCCESS,实际操作中只返回SUCCESS;。