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

@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <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>
<filter-name>CharacterEncodingFilter</filter-name> <filter-name>CharacterEncodingFilter</filter-name>
<filter-class>filter.CharacterEncodingFilter</filter-class> <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; Connection connection = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet resultSet = null; ResultSet resultSet = null;
System.out.println("????");
String sql = "select * from manager where ACCOUNT=? and PASSWORD=?"; String sql = "select * from manager where ACCOUNT=? and PASSWORD=?";
connection = Base.getConnection(); connection = Base.getConnection();
pstmt = (PreparedStatement) connection.prepareStatement(sql); pstmt = (PreparedStatement) connection.prepareStatement(sql);

@ -47,7 +47,7 @@ public class AdminLogin 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("admin", username); session.setAttribute("admin", username);
hashMap.put("code", 0); hashMap.put("code", 0);

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

@ -23,7 +23,7 @@ import net.sf.json.JSONObject;
public class SortList extends HttpServlet { public class SortList extends HttpServlet {
@Override @Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 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