To what class is the ClassNotFoundException referring ?
If it's the "Beans" class, then you must import java.beans.Beans.
If it's the actual bean, then check if it's in the classpath.
Btw, JSPs are compiled to servlets, so I guess that if JSPs handle JavaBeans
than servlets do this, too.
Cheers,
Luca
----- Original Message -----
From: "Pramod Nair" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 6:04 PM
Subject: Beans within servlets
> I am trying to use a bean from within a servlet that I have created. I try
> to instantiate the bean using
> Beans.instantiate(null , <BeanName>) , where null specifies the default
> class loader ... but a ClassNotFoundException is thrown by the above
code.
> I suspect it has something to do with the defualt class loader being
> invoked. Is there someway I can use the same classloader that loads my
> servlets ? ( All this was on an IPlanet Enterprise web server ).
> Or am I doing this all wrong ? Maybe beans work only with JSP's ? Could
> somebody shed some light on this ?
>
> regards
> Pramod Nair.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html