JAVA文件路径:C:\Program Files\Apache Tomcat 4.0\webapps\examples\jspCode\ejbclass
JSP路径:C:\Program Files\Apache Tomcat 4.0\webapps\examples\jspCode

解决方案 »

  1.   

    JAVA代码:
    package ejbclass;
    public class beanTest
    {
    private int[] dataSet={1,2,3,4,5,6};
    private String strTest;
    public beanTest()
    {
    this.strTest = new String("This is a bean test!");
    }
    public void setDataSet(int[] x)
    {
    this.dataSet = x;
    }
    public void setDataSet(int index,int x)
    {
    this.dataSet[index] = x;
    }
    public int[] getDataSet()
    {
    return this.dataSet;
    }
    public int getDataSet(int index)
    {
    return this.dataSet[index];
    }
    public void setStrTest(String s)
    {
    this.strTest = new String(s.toString());
    }
    public String getStrTest()
    {
    String strReturn = new String(this.strTest.toString());
    return strReturn;
    }
    }
      

  2.   

    讲ejbclass放到examples\WEB-INF\classes里面
      

  3.   

    tomcat的class放在WEN-INF\CLASSES里jsp才能找到