以下是我对拦截器的配置:
<interceptors>
<interceptor-stack name="storeStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="store">
<param name="operationMode">STORE</param>
</interceptor-ref>
</interceptor-stack>
<interceptor-stack name="retrieveStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
</interceptor-stack>
<interceptor-stack name="appDefaultStack">
<interceptor-ref name="defaultStack">
<param name="exception.logEnabled">true</param>
<param name="exception.logLevel">ERROR</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
而我的行动:
<action name="update/*" class="comics.comics.ComicsAction" method="view">
<interceptor-ref name="retrieveStack" />
<param name="key">{1}</param>
<result>/comics/comics-chapters.jsp</result>
</action>
<action name="add" class="comics.comics.ChapterAction" method="add">
<interceptor-ref name="storeStack" />
<result type="redirectAction">
<param name="parse">true</param>
<param name="key">${key}</param>
<param name="actionName">update</param>
<param name="namespace">/comics</param>
</result>
<result name="input" type="redirectAction">
<param name="parse">true</param>
<param name="key">${key}</param>
<param name="actionName">update</param>
<param name="namespace">/comics</param>
</result>
</action>
在我的comics-chapters.jsp 页面中,字段错误消失了。但是当我将输入结果更改为:
<result name="input">/comics/comics-chapters.jsp</result>
显示字段错误。
当我的输入结果是一个动作时如何显示字段错误?