Struts中Resources cannot be null错误
来源:互联网 发布:访客网络主人网络 编辑:程序博客网 时间:2024/05/22 06:59
java.lang.illegalargumentexception: resources cannot be null. org.apache.commons.validator.validator.<init>(validator.java:188) org.apache.struts.validator.resources.initvalidator(resources.java:475) org.apache.struts.validator.validatorform.validate(validatorform.java:104) ..............
这个问题还真的没有见过呢
乍一看还真蒙了,但是只要你出了这个问题还搜索到了这篇文章,那么你走运了
这个问题很简单,也很容易就解决了
出现这个问题首先检查struts-config.xml
例如把Form的type写成了Action的路径,就会报这样的错
<message-resources parameter="com.jatty.struts.ApplicationResources" />
如果是对的话,就看下你的ActionForm了,是否继承了ValidatorForm,ActionForm或者其他的Form父类。
就是因为你配置了struts的form,但是你没有给她配置validate方法。
加上validate就可以通过了。
还有一种解决方法就是在struts-config.xml里把validate="false"。
其实呢我犯的错误是ActionForm继承错了父类,我继承了Action!这等同于你没有配置好自己的ActionForm,因此会报出这样的错误!
0 0
- Struts中Resources cannot be null错误
- Struts中Resources cannot be null错误
- Struts中Resources cannot be null错误
- Resources cannot be null
- Resources cannot be null
- Resources cannot be null
- Resources cannot be null
- Resources cannot be null
- 错误java.lang.IllegalArgumentException: Resources cannot be null
- "Resources cannot be null" 问题
- java.lang.IllegalArgumentException: Resources cannot be null
- java.lang.IllegalArgumentException: Resources cannot be null
- java.lang.IllegalArgumentException: Resources cannot be null.
- java.lang.IllegalArgumentException: Resources cannot be null
- java.lang.IllegalArgumentException: Resources cannot be null.
- java.lang.IllegalArgumentException: Resources cannot be null.
- java hibernate 中"nodeto traverse cannot be null"错误解决
- Resources cannot be null. 缺少ActionForm的异常
- Servlet学习之初笔记
- Linux之初VI,用户,权限,FTP,JDK+Tomcat5+MySql使用
- Tomcat解压版配置说明
- 软件安装时x86与x64软件区别
- packageManager resolveInfo相关使用
- Struts中Resources cannot be null错误
- 绕过private成员函数访问限制
- Ant和JUnit结合进行单元测试 ant 软件包 org.junit 不存在
- EJB下remote not bound 错误
- Crontab 详解
- JS 打开一个模式窗口,使用Cookie传递一个参数
- Oracle修改计算机名称后监听无法启动
- Oracle常用SQL语句
- 能使用键盘移动的层页面代码