aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 60050
    
  65

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Value for the useBean class attribute is invalid -- why?
 
Similar Threads
jsp:usebean confusion
Cannot open JSP page
Using Session Bean Info in a server
Scripting with JSTL Core tags.
Creating a java bean in a servlet and accessing it in a jsp