标签:protect gen lap val user opened open charset 技术
获取参数信息:
@WebServlet("/register") public class RegisterServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("utf-8"); response.setContentType("text/html;charset=utf-8"); String username = request.getParameter("username"); String phone = request.getParameter("username"); String pwd = request.getParameter("username"); String[] hobby = request.getParameterValues("hobby");//获取复选框值 String gender = request.getParameter("gender"); String course = request.getParameter("course"); response.getWriter().print("hello"); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
标签:protect gen lap val user opened open charset 技术
原文地址:https://www.cnblogs.com/zhuxiang1633/p/9605828.html