该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

太低级不能上传附件啊,只好粘贴代码下来了,不好意思啊各位大神

mldn

public static final String URL = "abcd.jsp";

%>

public static final String DBDRIVER = "oracle.jdbc.driver.OracleDriver";

public static final String DBURL = "jdbc:oracle:thin:@localhost:1521:ORCL";

public static final String DBUSER = "scott";

public static final String DBPASSWORD = "tiger";

%>

Connection conn = null;

PreparedStatement pstmt = null ;

ResultSet rs = null;

int currentPage = 1;

int lineSize = 5;

%>

try{

currentPage = Integer.parseInt(request.getParameter("cp"));

}catch(Exception e ){}

%>

Class.forName(DBDRIVER);

conn = DriverManager.getConnection(DBURL,DBUSER,DBPASSWORD);

String sql = "SELECT empno,ename,job,hiredate,sal,comm FROM emp ORDER BY empno";

pstmt = conn.prepareStatement(sql);

rs = pstmt.executeQuery();

%>

雇员信息


function go(num){

document.getElementById("cp").value=num;

document.spform.submit();

}

>

雇员编号雇员姓名雇员工作雇佣日期雇员工资雇员奖金

for(int x= 0;x

rs.next();

}

for(int x = 0;x

if(rs.next()){

int empno = rs.getInt(1);

String ename = rs.getString(2);

String job = rs.getString(3);

Date hiredate = rs.getDate(4);

double sal = rs.getDouble(5);

double comm = rs.getDouble(6);

%>

}

}

%>

conn.close();

%>

更多推荐

java下一页按钮_关于java分页操作,怎么点下一页上一页都没反应?