Struts 2 ajax validation unable to find interceptor class jsonValidationWorkflowStack

落爺英雄遲暮 提交于 2019-12-01 05:05:21

问题


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.


回答1:


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

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



来源:https://stackoverflow.com/questions/11108644/struts-2-ajax-validation-unable-to-find-interceptor-class-jsonvalidationworkflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!