Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
James Adams
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
James Adams
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear, you nailed it. My class was missing the no-args constructor.

--James
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic