I put my beans into tomcat_home/webapps/myContext/WEB-INF/classes and have
no problem. Have you tried that?
-----Original Message-----
From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 4:39 PM
To: [EMAIL PROTECTED]
Subject: RE: Instantiating Beans on Tomcat
I have my beans in the tomcat_home/classes directory, this is definately in
the classpath, because I can instantiate the class by using
InfoBean test = new InfoBean();
I also have several other classes in there. Yes, I have put things to
output something in the constructor, doesn't work though for some reason. I
am very confused by it.
Brandon
-----Original Message-----
From: Jann VanOver [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 6:33 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Instantiating Beans on Tomcat
Two questions:
1. Where did you put your compiled bean?
2. Did you try putting SOMETHING in the constructor -- maybe
System.out.println("I'm here"); or something like that
-----Original Message-----
From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 3:54 PM
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
Any idea why this is happening, my java code doesn't have anything in it
yet, I just want to test it so that the bean will work, here is what I have
in the java in case I have that wrong...
public class InfoBean {
private String sample = "Sample";
public InfoBean() {
}//end constructor
public String getSample() {
return sample;
}
public void setSample(String newSample) {
sample = newSample;
}
}
Any ideas on what I'm doing wrong, could this be due to some session
settings in Tomcat?
Thanks!
Brandon