Hi,

I am new to JSP's and Beans. I have written a Java class which acceses a
MySQL database on a remote machine usingd JDBC. This class when run
using the java interpreter works fine and displays proper results.

Now, I converted the above class file into a bean, by creating a ".jar"
file and updated the manifest file accordingly. I am using the trial
Java Web Server 2.0, so I placed the ".jar" file in the "lib" directory
of the Java Web Server, and restarted the web server.

I have a JSP file which uses the above mentioned class as a bean. When I
try to access it, it gives me the following error :
        " javax.servlet.ServletException : Cannot create bean of class
abc.dbclass "

In the above message "dbclass" is my bean class, whereas abc is the
folder containig that class when the ".jar" file was created.

All the JDBC drivers that are required, have also been placed in the
appropriate directory hierrarchy.

Just to doble check I tried writting a very simple bean which just had a
method that displayed a message. When I ran the JSP with this particular
bean, it worked fine.

I want to know that are there any particular things that are not to be
performed in a bean, or which don't work in a bean, or any special care
to be taken while writting a bean which uses JDBC. Or any other area
which I may have overlooked.

Also supplement your answer with some examples, if possible.


Thanx a lot,
Masaoud

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to