基于jsp的图书管理系统的功能和实现
源代码在线查看: showstudent.jsp
无标题文档
.STYLE1 {font-size: 9px}
-->
.STYLE9 {font-size: 24px; font-weight: bold; color: #3399FF; }
.STYLE12 {font-size: 16px; font-weight: bold; color: #000000; }
.STYLE13 {font-size: 16px; color: #FFFFFF; }
.STYLE14 {
color: #FFFFFF;
font-weight: bold;
font-size: 14px;
}
-->
Connection conn=null;
Statement stmt=null;
ResultSet rs=null;
String strSql="";
String str =(String)request.getParameter("id");
byte b[]=str.getBytes("ISO-8859-1");
str=new String(b);
try{
LoginData loginData = new LoginData();
conn = loginData.getConn();
stmt=conn.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
strSql="SELECT * FROM Reader where Rnumber='"+str+"'";
rs = stmt.executeQuery(strSql);
if(rs.next()){
}
else{
response.sendRedirect("tushu/error.jsp");
}
}catch(SQLException e){
System.out.println(e.getMessage());
}
%>
新书入库
图书借出
还书系统
学生信息
管理员信息
学生信息
out.print("读者编号: ");
out.print(rs.getString("Rnumber"));
session.setAttribute("Rnum",rs.getString("Rnumber"));
%>
out.print("读者姓名: ");
out.print(rs.getString("Rname"));
%>
out.print("读者性别: ");
out.print(rs.getString("Rsex"));
%>
out.print("读者出生日期: ");
out.print(rs.getString("Rbirth"));
%>
out.print("读者类别: ");
out.print(rs.getString("Rsort"));
%>
out.print("借书上限: ");
out.print(rs.getString("Rlimited"));
%>
out.print("已借数目: ");
out.print(rs.getString("Ryamount"));
stmt.close();
conn.close();
%>