添加首页跳转到图书馆首页

pull/1/head
you 5 years ago
parent f2244342db
commit e3c3764579

@ -19,7 +19,7 @@
<li class="layui-nav-item"> <li class="layui-nav-item">
<a href="javascript:;">其它系统</a> <a href="javascript:;">其它系统</a>
<dl class="layui-nav-child"> <dl class="layui-nav-child">
<dd><a href="../loginReader.html">图书馆首页</a></dd> <dd><a href="../reader/04readerFrame.jsp">图书馆首页</a></dd>
<dd><a href="../loginManager.html">图书管理员</a></dd> <dd><a href="../loginManager.html">图书管理员</a></dd>
</dl> </dl>
</li> </li>

@ -7,6 +7,8 @@
<title>Insert title here</title> <title>Insert title here</title>
</head> </head>
<body> <body>
<h1>hello</h1> <%
response.sendRedirect("./reader/04readerFrame.jsp");
%>
</body> </body>
</html> </html>

@ -17,7 +17,6 @@ public class Reader {
Connection connection = null; Connection connection = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet resultSet = null; ResultSet resultSet = null;
System.out.println("????");
String sql = "select * from borrow_card where ID=? and PASSWORD=?"; String sql = "select * from borrow_card where ID=? and PASSWORD=?";
connection = Base.getConnection(); connection = Base.getConnection();
pstmt = (PreparedStatement) connection.prepareStatement(sql); pstmt = (PreparedStatement) connection.prepareStatement(sql);

@ -62,7 +62,6 @@ public class Book extends HttpServlet {
sql += where; sql += where;
} }
sql += " limit ?,?";// 1 10 (1-1)*10 sql += " limit ?,?";// 1 10 (1-1)*10
System.out.println("???" + sql);
pstmt = connection.prepareStatement(sql); pstmt = connection.prepareStatement(sql);
pstmt.setInt(1, (Integer.parseInt(page) - 1) * Integer.parseInt(limit)); pstmt.setInt(1, (Integer.parseInt(page) - 1) * Integer.parseInt(limit));
pstmt.setInt(2, Integer.parseInt(limit)); pstmt.setInt(2, Integer.parseInt(limit));

@ -41,7 +41,7 @@ public class ReaderLogin extends HttpServlet {
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
e.printStackTrace(); e.printStackTrace();
} }
if (result.equals("1")) { if (result != null && result.equals("1")) {
HttpSession session = request.getSession(); HttpSession session = request.getSession();
session.setAttribute("reader", user); session.setAttribute("reader", user);
session.setAttribute("reader_first", "1"); // 登录 session.setAttribute("reader_first", "1"); // 登录

Loading…
Cancel
Save