struts验证问题
2007-2-22 15:25:57 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validator-rules.xml '
2007-2-22 15:25:57 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validation.xml '
2007-2-22 15:25:57 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2007-2-22 15:25:57 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2007-2-22 15:25:58 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validator-rules.xml '
2007-2-22 15:25:58 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validation.xml '
2007-2-22 15:25:58 org.apache.struts.validator.ValidatorPlugIn init
严重: Skipping validation rules file from '/WEB-INF/validation.xml '. No stream could be opened.
javax.servlet.ServletException: Skipping validation rules file from '/WEB-INF/validation.xml '. No stream could be opened.
at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:222)
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
...
2007-2-22 15:25:58 org.apache.catalina.core.ApplicationContext log
信息: Marking servlet action as unavailable
2007-2-22 15:25:58 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /ok threw load() exception
javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml '
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
...007-2-22 15:25:58 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validator-rules.xml '
2007-2-22 15:25:58 org.apache.struts.validator.ValidatorPlugIn initResources
信息: Loading validation rules file from '/WEB-INF/validation.xml '
2007-2-22 15:25:58 org.apache.struts.validator.ValidatorPlugIn init
严重: Skipping validation rules file from '/WEB-INF/validation.xml '. No stream could be opened.
javax.servlet.ServletException: Skipping validation rules file from '/WEB-INF/validation.xml '. No stream could be opened.
at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:222)
2007-2-22 15:25:58 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /ok threw load() exception
javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml '
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
...
信息: SessionListener: contextInitialized()
2007-2-22 15:26:00 org.apache.struts.action.ActionServlet init
严重: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
java.lang.NoClassDefFoundError: org/apache/commons/chain/config/ConfigParser
at org.apache.struts.action.ActionServlet.initChain(ActionServlet.java:1625)
...
我文档中并没要求作验证,为什么会自动加载验证,并且出错呀?
[解决办法]
你的struts-config.xml 看看
[解决办法]
up
[解决办法]
因为在struts-config.xml 文件中action设置的时候有validate= "true ",改为false 就不会验证了
[解决办法]
看看是不是validation.xml有错误
[解决办法]
"因为在struts-config.xml 文件中action设置的时候有validate= "true ",改为false 就不会验证了 "
另外看看你struts-config.xml是不是配置plus-in了.关于validation的
[解决办法]
人家本来就想要验证,你还要叫人关了 validate= "true "