The value for the useBean class attribute XXX is invalid
2006-10-29 14:21
537 查看
Tomcat 报告 “The value for the useBean class attribute XXX is invalid” 这个错误可能源于以下几个原因:
1. 在编译 JSP 时,指定的 Bean 类没找到
2. Bean 虽然找到了,但是该类不是 public 的,或者找到的 class 文件是 interface 或抽象类
3. Bean 类中没有 public 的无参数构建函数
第二点很明显,不用多解释,最经常遇到的情况是 Bean 类忘了声明为 public 。
第三点中需要注意的是,如果你的 Bean 类没有提供任何构造函数,将自动生成一个默认构建函数,这没有问题。如果你有构造函数,则不会自动生成该默认构造函数。另外经常忽略的问题是写了默认构造函数却不是 public 的。
1. 在编译 JSP 时,指定的 Bean 类没找到
2. Bean 虽然找到了,但是该类不是 public 的,或者找到的 class 文件是 interface 或抽象类
3. Bean 类中没有 public 的无参数构建函数
第二点很明显,不用多解释,最经常遇到的情况是 Bean 类忘了声明为 public 。
第三点中需要注意的是,如果你的 Bean 类没有提供任何构造函数,将自动生成一个默认构建函数,这没有问题。如果你有构造函数,则不会自动生成该默认构造函数。另外经常忽略的问题是写了默认构造函数却不是 public 的。
相关文章推荐
- The value for the useBean class attribute XXX is invalid 异常解释
- WEB-INF\classes 为空 The value for the useBean class attribute xxx is invalid
- Tomcat————The value for the useBean class attribute XXX is invalid 异常绝对详解释
- The value for the useBean class attribute XXX is invalid 问题详解
- The value for the useBean class attribute XXX is invalid 异常绝对详解释
- The value for the useBean class attribute XXX is invalid.解决方法
- The value for the useBean class attribute XXX is invalid
- 关于JSP文件运行时抛出The value for the useBean class attribute XXX is invalid异常的分析
- The value for the useBean class attribute XXX is invalid”
- 关于Tomcat: The value for the useBean class attribute is invalid 错误提示的解决方案
- 详解 Tomcat: The value for the useBean class attribute is invalid 问题
- 详解 Tomcat: The value for the useBean class attribute is invalid 问题
- The value for the useBean class attribute is invalid
- org.apache.jasper.JasperException The value for the useBean class attribute class.MyBean is invalid.
- JSP(Tomcat)问题: The value for the useBean class attribute is invalid
- The value for the useBean class attribute is invalid 问题
- Tomcat 中 "The value for the useBean class attribute is invalid" 错误的排除
- 关于"The value for the useBean class attribute is invalid" 错误<转>
- The value for the useBean class attribute is invalid 问题
- The value for the useBean class attribute is invalid 问题