TOMCAT上显示:
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /bookshoponline/chklogin.jsp(6,0) The value for the useBean class attribute connection.ConnPool is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1200)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1155)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.这是说明什么?具体怎么解决?谢谢!(我刚来这网站,许多不懂,所以关于给分,我真的不好意思没多少分可给)

解决方案 »

  1.   

    org.apache.jasper.JasperException: /bookshoponline/chklogin.jsp(6,0) The value for the useBean class attribute connection.ConnPool is invalid.错误很明显。
    connection.ConnPool这个东西在useBean 里面是非法的。 chklogin.jsp的第6行
      

  2.   

    connection.ConnPool 在useBean类 里面是非法的。检查下userBean里面的属性。
      

  3.   

    /bookshoponline/chklogin.jsp(6,0) The value for the useBean class attribute connection.ConnPool is invalid. 恩在chklogin.jsp(6,0) 中的第6行
    使用了无效的属性检查下connection.ConnPool
      

  4.   

    我看了,但是我看不懂,我把它发上来,能帮忙看看哪错了吗?
    package connection;
    import java.io.Serializable;
    import java.sql.*;
    import java.util.*;public class ConnPool implements java.io.Serializable{
      private String driver = null; //数据库驱动程序对象
      private String url = null; //数据源的位置
      private int size = 0; //连接池的最大连接数目
      private String username = ""; //数据源的用户名
      private String password = ""; //数据源的密码
      private DbConn dc=null; 
      private Vector pool = null; //连接池中的连接列表  public ConnPool(){}
      
      //设置数据库驱动程序
      public void setDriver(String driver){
        if (driver!=null) this.driver=driver;
      }
      
      //获取数据库驱动程序
      public String getDriver(){
        return driver;
      }  //设置数据源的位置
      public void setURL(String url){
        if (url!=null) this.url=url;
      }
      
      //获取数据源的位置
      public String getURL(){
        return url;
      }
      
      //设置最大连接数
      public void setSize(int size){
        if (size>1) this.size=size;
      }
      
      //获取最大连接数
      public int getSize(){
        return size;
      }
      
      //设置数据源的用户名
      public void setUsername(String username){
        if (username!=null) this.username=username;
      }
      
      //获取数据源的用户名
      public String getUserName(){
        return username;
      }  //设置数据源的密码
      public void setPassword(String password){
        if (password!=null) this.password=password;
      }
      
      //获取数据源的密码
      public String getPassword(){
        return password;
      }  //设置用于单个连接任务的DbConn对象
      public void setConnBean(DbConn dc){
        if (dc!=null) this.dc=dc;
      }
      
      //获取用于单个连接任务的DbConn对象
      public DbConn getConnBean() throws Exception{
        Connection conn = getConnection();
        DbConn dc = new DbConn(conn); //实例化DbConn类
        dc.setInuse(true);  //设置此连接可用
        return dc;
      }  //创建到数据库的连接
      private Connection createConnection() throws Exception{
        Connection con = null;
        con = DriverManager.getConnection(url,username,password);
        return con;
      }
      
      //初始化连接池
      public synchronized void initializePool() throws Exception{
        if (driver==null) //如果没有加载驱动
          throw new Exception("No Driver Provided!");
        if (url==null)  //如果没有设置数据源的位置
          throw new Exception("No URL Proviced!");
        if (size<1) //如果当前没有可用的连接
          throw new Exception("Connection Pool Size is less than 1!");
        try{
          Class.forName(driver);
          for (int i=0; i<size; i++){
           //创建连接
            Connection con = createConnection();
            if (con!=null){
              //将指定连接加入连接向量末尾
              DbConn dc = new DbConn(con);
              addConnection(dc);
            }
          }
        }catch (Exception e){
          System.err.println(e.getMessage());
          throw new Exception(e.getMessage());
        }
      }  //将指定连接加入连接向量末尾
      private void addConnection(DbConn conn){
        if (pool==null) pool=new Vector(size);
        pool.addElement(conn);
      }  //释放指定连接的资源
      public synchronized void releaseConnection(Connection con){
        for (int i=0; i<pool.size(); i++){
          DbConn connBean = (DbConn)pool.elementAt(i);
          if (connBean.getConnection()==con){
           //寻找到指定连接,将其置为未使用状态
            connBean.setInuse(false);
            break;
          }
        }
      }  //从连接池得到一个连接
      public synchronized Connection getConnection() throws Exception{
        DbConn dc = null;
        for (int i=0; i<pool.size(); i++){
          dc = (DbConn)pool.elementAt(i); // 从连接列表中获得所有连接
          if (dc.getInuse()==false){
           //如果还有未使用的连接,则使用这个连接
            dc.setInuse(true);
            Connection con = dc.getConnection();
            return con;
          }
        }
        //如果连接都已使用,则新建一连接
        try{
          Connection con = createConnection();
          dc = new DbConn(con);
          dc.setInuse(true);
          pool.addElement(dc);
        }catch (Exception e){
          System.err.println(e.getMessage());
          throw new Exception(e.getMessage());
        }
        return dc.getConnection();
      }  //清空连接池,释放资源
      public synchronized void emptyPool(){
        for (int i=0; i<pool.size(); i++){
          DbConn connBean = (DbConn)pool.elementAt(i);
          if (dc.getInuse()==false)
            dc.close(); //释放连接资源
          else{
            try{
              java.lang.Thread.sleep(20000);
              dc.close();
            }catch (InterruptedException ie){
              System.err.println(ie.getMessage());
            }
          }
        }
       }
    }
      

  5.   

    我把connection.ConnPool贴出来了,在6楼,能告诉我具体怎么改吗?多谢!