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

 

<%@page import=\

<% String sming=request.getParameter(\

String ming=new String(sming.getBytes(\

Class.forName(\ Connection

con=DriverManager.getConnection(\est\ Statement

sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); ResultSet rs=sql.executeQuery(\* from users where userID='\

response.getContentType(); request.getCharacterEncoding();

response.setContentType(\ request.setCharacterEncoding(\ if(rs.next()) {

out.print(\align=\class=\用户信息如下:

\

out.print(\ out.print(\ out.print(\用户名\ out.print(\密码\ out.print(\

rs=sql.executeQuery(\ where userID='\ while(rs.next()) {

String a,b; a=rs.getString(1); out.print(\ b=rs.getString(2); out.print(\ } } else

out.print(\align=\class=\此用户不存在 !

\ con.close(); %>

用户查询

 

<%@page import=\

<% Class.forName(\ Connection

con=DriverManager.getConnection(\est\

Statement

sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); ResultSet rs=sql.executeQuery(\ response.getContentType(); request.getCharacterEncoding();

response.setContentType(\ request.setCharacterEncoding(\

out.print(\align=\class=\所有用户信息如下:

\

out.print(\ out.print(\ out.print(\用户名\ out.print(\密码\ out.print(\ while(rs.next()) { String a,b; a=rs.getString(1); out.print(\ b=rs.getString(2); out.print(\ }

con.close(); %>

4、程序实现—使用流程:

1、首页登录:分为普通用户登录和管理员登录:

普通用户登录:

普通用户登录的欢迎页面,点击跳转到图书借阅页:

图书借阅选择页:

选择借阅查看,输入确认用户名,来查询图书的借阅情况信息:

显示借阅信息:

点击图书查询,进入页面。本页面可以查看所有图书信息或单独查询某书的信息两种功能: