I'm so bewildered here.  I'm just now setting up Tomcat on a Win98 machine.  Tomcat is working great for the examples that were sent but I cannot get it to recognize a java class that I built just to put in a jsp.  The only thing referenced about the class is the class.   I've put the class in the tomcat\classes directory and also in the tomcat\webapps\jeff\lib directory
 
I receive the following errors:
 
javax.servlet.ServletException:  Cannot create bean of class Joe
 
 
 
Here is the source for the jsp:
<html>
<jsp:useBean id='joe' scope='session' class='Joe'/>
<head>
</head>
</body>
</html>
 
Here is the source for "Joe":

import java.io.*;
import java.util.*;
import java.math.*;
import java.text.*;

public class Joe {
private int i;
private String str;
        Joe() {
                i = 1;
                str = "For the fun of it";
        }
        public void setI(int j) {
                i = j;
        }
        public void setStr(String j) {
                str = j;
        }
        public int getI(){
                return i;
        }
        public String getStr() {
                return str;
        }
}
 


 

Reply via email to