POST请求
Request URL: http://localhost:8080/servlet/CheckAdminLoginServlet
Referrer Policy: no-referrer-when-downgrade
Provisional headers are shown
Content-Type: application/x-www-form-urlencoded
Origin: http://localhost:8080
Referer: http://localhost:8080/login/login.jsp
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
name: admin
password: admin
submit.x: 31
submit.y: 11
Servlet:
public class CheckAdminLoginServlet extends HttpServlet {
....
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
//System.out.println("post");
String name = request.getParameter("name"); //这里得到的name就是null
String password = request.getParameter("password"); //这里得到的password也是null
....
}
}