JSP制作带有数据库网页javaee课程设计 - 图文

 

注册成功

String sming=request.getParameter(\ String ming=new String(sming.getBytes(\ String spassword=request.getParameter(\ String password=new String(spassword.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()) response.sendRedirect(\ else { sql.executeUpdate(\into users(userID,upass) values('\ out.print(\align=\class=\普通用户注册成功,请记好您的ID号!!!\ } con.close(); %>

(3)借阅:

魔力书城图书借阅

 

查询图书:

查看所有图书信息

 

<%@page import=\<%

Class.forName(\ Connection

con=DriverManager.getConnection(\est\ Statement

sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); response.getContentType();

request.getCharacterEncoding();

response.setContentType(\

request.setCharacterEncoding(\

ResultSet 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(); %>

借阅图书查询

联系客服:779662525#qq.com(#替换为@)