Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSP cant find bean Class using "" modifiers

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="*" />

When I run the program I get this error

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 ""

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.

like image 550
Ravana Avatar asked Aug 23 '26 17:08

Ravana


1 Answers

I figured it out. My constructor was not public....

like image 100
Ravana Avatar answered Aug 26 '26 22:08

Ravana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!