packagecom.xiaocui.controller;
importjava.io.IOException;
importjava.util.Arrays;
importjavax.servlet.ServletException;
importjavax.servlet.annotation.WebServlet;
importjavax.servlet.http.HttpServlet;
importjavax.servlet.http.HttpServletRequest;
importjavax.servlet.http.HttpServletResponse;
/**
* Request
*/
@WebServlet("/RequestDemo1")
publicclassRequestDemo1extendsHttpServlet {
protectedvoiddoGet(HttpServletRequestrequest,HttpServletResponseresponse) throwsServletException, IOException {
Stringusername = request.getParameter("username");
Stringpassword = request.getParameter("password");
Stringsex = request.getParameter("sex");
Stringcity = request.getParameter("city");
String[]info = request.getParameterValues("info");
System.out.println("用户名" + username);
System.out.println("密码" + password);
System.out.println("性别" + sex);
System.out.println("自我介绍" + info);
}
protectedvoiddoPost(HttpServletRequestrequest,HttpServletResponseresponse) throwsServletException, IOException {
doGet(request, response);
}
}
here
网页登录
用户名:
密码:
性别:
个人介绍:
是否确认登录?
注册: