2 Replies Latest reply on Mar 29, 2006 4:20 AM by Steven Payeur

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

    James Adams Novice

      I have a JSP which when called gives the following error:

      11:27:07,135 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: /useractivity/UserActivitiesDisplayAndUpdate.jsp(9,0) The value for the useBean class attribute com.mycom.grover.bean.UserActivity is invalid.

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

      if (userActivity != null)
       // add the bean to the session
       request.getSession().setAttribute("userActivity", userActivity);
       // redirect the request

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

      <jsp:useBean id="userActivity"

      Am I mistaken in assuming that I can do this?

      Can someone tell me what I'm doing wrong?