JSP制作带有数据库网页javaee课程设计 下载本文

图书载入结果

 

<%@page import=\<% response.getContentType();

request.getCharacterEncoding();

response.setContentType(\ request.setCharacterEncoding(\ String shao=request.getParameter(\ String hao=new String(shao.getBytes(\ String sming=request.getParameter(\ String ming=new String(sming.getBytes(\ String szuo=request.getParameter(\ String zuo=new String(szuo.getBytes(\ String schu=request.getParameter(\ String chu=new String(schu.getBytes(\ String sku=request.getParameter(\ String ku=new String(sku.getBytes(\ Class.forName(\ Connection

con=DriverManager.getConnection(\est\ Statement

sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); ResultSet rs=sql.executeQuery(\

if(rs.next()) out.print(\align=\class=\此书(图书编号:'\已存在于数据库中,插入失败 !

\ else { sql.executeUpdate(\into book(bookno,bookname,zuozhe,chuban,kucun)

values('\ out.print(\已将图书(图书编号:'\)录入数据库!

\ }

rs=sql.executeQuery(\

out.print(\align=\class=\数据库中的书目如下:

\

out.print(\ out.print(\ out.print(\书号\ out.print(\书名\ out.print(\作者\

out.print(\出版社\ out.print(\库存量\ out.print(\ while(rs.next()) { String a,b,c,d,e; a=rs.getString(1); out.print(\ b=rs.getString(2); out.print(\ c=rs.getString(3); out.print(\ d=rs.getString(4); out.print(\ e=rs.getString(5); out.print(\ out.print(\ }

con.close(); %>

修改:

图书修改