pull/1/head
you 5 years ago
parent a69f14fad7
commit 3c9cd4f52f

@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<servlet>
<servlet-name>servletExample</servlet-name>
<servlet-class>servlet.ServletExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>servletExample</servlet-name>
<url-pattern>/servletExample</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>filter.CharacterEncodingFilter</filter-class>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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

@ -47,7 +47,7 @@ public class AdminLogin extends HttpServlet {
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
if (result.equals("1")) {
if (result != null && result.equals("1")) {
HttpSession session = request.getSession();
session.setAttribute("admin", username);
hashMap.put("code", 0);

@ -22,6 +22,7 @@ import javabean.Util;
public class ManagerDel extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("application/json; charset=utf8");
String id = req.getParameter("id");
// 准备参数
String sql = "";

@ -23,7 +23,7 @@ import net.sf.json.JSONObject;
public class SortList extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("application/json; charset:utf8");
resp.setContentType("application/json; charset=utf8");
// 接受参数
// 准备参数

Loading…
Cancel
Save