Struts 使用 Validator插件问题


struts-config.xml中 加入

<message-resources parameter=""/>

<!-- plug-in Validator -->
[color=red] 
[b]<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>[/b]  [/color]

运行时会报错
type Status report

message Servlet action is not available

description The requested resource (Servlet action is not available) is not available.

但是如果去掉 系统就正常,
查了很多网页,都说需要注意 Struts配置文件的顺序,可是我没有看出来顺序不对!!!

这个如果解决呀!!

只要有/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml这两个文件就可以了
不用加那个了




struts-config.xml文件配置错误,需要映射到action的路径才行!