Struts 2 ajax验证无法找到拦截器类jsonValidationWorkflowStack [英] Struts 2 ajax validation unable to find interceptor class jsonValidationWorkflowStack

查看:236
本文介绍了Struts 2 ajax验证无法找到拦截器类jsonValidationWorkflowStack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Struts 2应用程序中实现ajax验证。我在构建路径中包含了struts2-json-plugin。每当我在Eclipse中启动服务器时,都会收到以下错误:


无法找到ref-name引用的拦截器类
jsonValidationWorkflowStack - interceptor-ref -
文件:/ C:/path/struts.xml:15:60


我的struts.xml如下所示:

 < struts> 
< constant name =struts.url.includeParamsvalue =all/>
< constant name =struts.devModevalue =true/>
< package name =defaultextends =struts-default>
< action name =submitFormclass =action.FormAction>
< interceptor-ref name =jsonValidationWorkflowStack/>
< result> results.jsp< / result>
< result name =input> index.jsp< / result>
< result name =error> index.jsp< / result>
< / action>
< / package>
< / struts>

为什么会发生这种情况?我正在遵循官方的struts2 ajax验证教程

解决方案

你需要扩展 -default包。



struts-default了解jsonValidationWorkflowStack


I'm trying to implement ajax validation in my Struts 2 application. I have included struts2-json-plugin in the build path. Whenever I start the server in Eclipse, I get the following error:

Unable to find interceptor class referenced by ref-name jsonValidationWorkflowStack - interceptor-ref - file:/C:/path/struts.xml:15:60

This is what my struts.xml looks like:

<struts>
<constant name="struts.url.includeParams" value="all" />
<constant name="struts.devMode" value="true" />
<package name="default" extends="struts-default">
    <action name="submitForm" class="action.FormAction" >
        <interceptor-ref name="jsonValidationWorkflowStack"/>
        <result>results.jsp</result>
        <result name="input">index.jsp</result>
        <result name="error">index.jsp</result>
    </action>
</package>  
</struts>

Why is this happening? I'm following the official struts2 ajax validation tutorial at.

解决方案

You need to extend the "json-default" package.

The "struts-default" package doesn't know about the "jsonValidationWorkflowStack".

这篇关于Struts 2 ajax验证无法找到拦截器类jsonValidationWorkflowStack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆