Hey! The JSP spec (and my common sense) says that if a bean is not found, it will be instantiated. But when i try to use a bean using the <jsp:useBean> tag it reports the following error (truncated the long stack trace) The bean phoneBook, which is referred does have a public no argument constructor. The class exists in the \WEB-INF\classes\ folder. Other classes in the same package have no problem in instantiation. The servlet container is Tomcat 4.1.18. Whats wrong? thanks sudharsan
Jason Menard
Sheriff
Joined: Nov 09, 2000
Posts: 6450
posted
0
It might help if we could see the JSP code. One reason you might get something like this is if you did a usebean for "PhoneBook" and then later referenced it as "phoneBook".
...But when i try to use a bean using the <jsp:useBean> tag it reports the following error...
Are you sure that it is the jsp:useBean tag that causes the error? Maybe it is a jsp:getProperty or jsp:setProperty tag? Maybe put in some <% System.out.println("..."); %> statements to be sure? Cheers- - Marty
Java training and consulting<br /><a href="http://www.coreservlets.com/" target="_blank" rel="nofollow">http://www.coreservlets.com/</a>
Sudharsan Govindarajan
Ranch Hand
Joined: Jul 03, 2002
Posts: 319
posted
0
Marty, Just a single line of JSP code was enough to reproduce this error. I tested with a jsp file containing only this line
And I'm sure abt the spelling of the id value. -sudharsan