GeeCON Prague 2014*
The moose likes JSP and the fly likes Value for the useBean class attribute is invalid -- why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Value for the useBean class attribute is invalid -- why?" Watch "Value for the useBean class attribute is invalid -- why?" New topic
Author

Value for the useBean class attribute is invalid -- why?

James Adams
Ranch Hand

Joined: Sep 12, 2003
Posts: 188
I have a JSP which when called gives the following error:



In the servlet which directly precedes the JSP I have set an object of this class into the HttpSession as an attribute, like so:



In the JSP I want to use the object as a bean so instead of using session.getAttribute() I use jsp:useBean, like so:



Am I mistaken in assuming that I can do this?

Can someone tell me what I'm doing wrong?


--James
[ April 11, 2005: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

Is com.mycom.grover.bean.UserActivity truly a JavaBean following the bean pattern? Does it have a no-args constructor?
[ April 11, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
James Adams
Ranch Hand

Joined: Sep 12, 2003
Posts: 188
Thanks Bear, you nailed it. My class was missing the no-args constructor.

--James
 
GeeCON Prague 2014
 
subject: Value for the useBean class attribute is invalid -- why?