Is InfoBean in a package? If it is, you need to put the fully-qualified name
in the class= attribute.
It could also be a classpath issue. For example, if your jsp sits at
/jakarta-tomcat/webapps/app, and your bean sits at
/jakarta-tomcat/webapps/app/WEB-INF/classes/com/foo, then you do need to put
/jakarta-tomcat/webapps/app/WEB-INF/classes on the classpath...at least
that's what I've found I have to do to get the beans to instantiate from a
jsp....
--Kyle
-----Original Message-----
From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 5:15 PM
To: [EMAIL PROTECTED]
Subject: RE: Instantiating Beans on Tomcat
Yeah, there must be something I'm missing, maybe there's some setting in
tomcat which allows me to use beans or something, but I can't find where
that would be.
Brandon
-----Original Message-----
From: Hunter Hillegas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 6:00 PM
To: Tomcat User List
Subject: Re: Instantiating Beans on Tomcat
I was getting those but it was because my bean didn't have a constructor
that took no args but it looks like yours does...
Not sure...
Hunter
> From: "Brandon Cruz" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Tue, 10 Apr 2001 17:54:24 -0500
> To: <[EMAIL PROTECTED]>
> Subject: Instantiating Beans on Tomcat
>
> I am trying to instantiate a very simple bean on Tomcat in a JSP using the
> directive...
>
> <jsp:useBean id="sessionBean" scope="session" class="InfoBean" />
>
> Everytime I try to run it, I get the following exception...
>
> javax.servlet.ServletException: Cannot create bean of class InfoBean