Thank you, Rinehart! Both for clearing up my confusion and letting us know
what the source of your problem was. With my luck, I'll get the same error
myself very soon!
-----Original Message-----
From: MacCormac Rinehart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 10:19 AM
To: '[EMAIL PROTECTED]'
Subject: RE: cannot create bean of class...
I got this one resolved. The issue was I had a non-initialized Java Class
member variable in my bean.
-----Original Message-----
From: MacCormac Rinehart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 2:00 PM
To: '[EMAIL PROTECTED]'
Subject: RE: cannot create bean of class...
The code you cite below is generated by Tomcat from the .jsp source. In
this case my source class is riddler.jsp, and Tomcat creates a class, in
this case called "_0002fjsp_0002friddler_0002ejspriddler_jsp_7.java". That
code is created in the Tomcat's work directory, and it is what is generated
when you use the <jsp:useBean> tag.
-----Original Message-----
From: Jann VanOver [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 1:00 PM
To: '[EMAIL PROTECTED]'
Subject: RE: cannot create bean of class...
Your original post included a bit more code:
----------------------
This is the try-catch block from the generated servlet code where the error
message is generated:
try {
riddler = (riddles.Riddler)
Beans.instantiate(this.getClass().getClassLoader(), "riddles.Riddler");
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class
"+"riddles.Riddler");
}
----------------------
Forgive my ignorance, but why are you calling <jsp:usebean AND writing the
code to instantiate? Don't you just need one or the other?
-----Original Message-----
From: MacCormac Rinehart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 11:31 AM
To: '[EMAIL PROTECTED]'
Subject: RE: cannot create bean of class...
Yes, I deployed the directory named "riddles" to the WEB-INF\classes folder.
The full path to my class files is:
C:\tomcat\jakarta-tomcat-3.2.1\webapps\riddler\WEB-INF\classes\riddles
-----Original Message-----
From: Jann VanOver [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 10:14 AM
To: '[EMAIL PROTECTED]'
Subject: RE: cannot create bean of class...
You said "I have deployed my riddles package in the WEB-INF/classes
directory for this program."
Does that mean you made a directory named "riddles" in WEB-INF/classes and
you put your class files in it? That is where the need to be to be seen by
Tomcat.
-----Original Message-----
From: MacCormac Rinehart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 8:07 AM
To: Tomcat-users (E-mail)
Subject: cannot create bean of class...
Hi,
I'm trying again to get some feedback on this issue of instantiating a bean
with Tomcat 3.2.1. I have deployed my riddles package in the WEB-INF/classes
directory for this program.
There is an empty constructor in the bean. I
have already ruled out a ClassNotFound exception. At this point I think I
am down to a configuration issue. I am using Tomcat 3.2.1. If someone
knows the resolution to this issue, please let me know. Thanks,
Mac
PS for further information see below:
This is the useBean tag copied directly from my JSP:
<jsp:useBean id="riddler" class="riddles.Riddler" scope="request"/>
Below is the code in my web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
</web-app>
Below is the context entry from my server.xml file:
<Context path="/riddler"
docBase="webapps/riddler"
defaultSessionTimeOut="30"
crossContext="false"
debug="0"
reloadable="true">
</Context>