解决方案 »

  1.   

    JSP参数传到后台Connection conn = DbUtil.getCon();
    String sql = "select hphm from xxx";
    try {
    Statement stat = conn.createStatement();
     ResultSet rs =stat.executeQuery(sql);
     while(rs.next()){
     System.out.println(rs.getString(1));
     }

    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }finally{
    if(conn!=null){
    try {
    conn.close();
    } catch (SQLException e) {
    e.printStackTrace();
    }
    }

    }
    如果参数没传过来就看下你少不少mysql的conn架包