JSP无法使用“”查找bean类。修饰符 [英] JSP cant find bean Class using "" modifiers
问题描述
嘿,我将Netbeans用于我的IDE,当我尝试运行EJB程序时遇到错误。当我声明并将JSP中的类的路径提供给bean时,我得到一个错误。
Hey I'm using Netbeans for my IDE and I'm getting an error when I try to run my EJB program. I get an error when I declare and give the path of the class in my JSP to a bean.
<jsp:useBean id="book" class="BookBean.Book" scope="application" />
<jsp:setProperty name="book" property="*" />
运行程序时出现此错误
javax.servlet.ServletException:
java.lang.InstantiationException:
类BookBean.Book:
java.lang.IllegalAccessException:
类java.beans.Beans无法使用
修饰符
javax.servlet.ServletException: java.lang.InstantiationException: class BookBean.Book : java.lang.IllegalAccessException: Class java.beans.Beans can not access a member of class BookBean.Book with modifiers ""
来访问BookBean.Book类的
a成员
and
java.lang.InstantiationException: class BookBean.Book : java.lang.IllegalAccessException: Class java.beans.Beans can not access a member of class BookBean.Book with modifiers ""
我删除了并放入了看看是否可行,但不可行。任何的想法?
我也在那儿放了一个断点,它定义了。是问题的根源。
谢谢。
I removed the "" and put in '' to see if that works, but it doesn't. Any idea? I also put a breakpoint there and it def. is the root of the problem. Thanks.
推荐答案
我知道了。我的构造函数不是公开的。...
I figured it out. My constructor was not public....
这篇关于JSP无法使用“”查找bean类。修饰符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!