package xwcms.net.service; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ResultServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; /** * The doGet method of the servlet. <br> * * This method is called when a form has its tag value method equals to get. * * @param request * the request send by the client to the server * @param response * the response send by the server to the client * @throws ServletException * if an error occurred * @throws IOException * if an error occurred */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } /** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to * post. * * @param request * the request send by the client to the server * @param response * the response send by the server to the client * @throws ServletException * if an error occurred * @throws IOException * if an error occurred */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); String validateC = (String) request.getSession().getAttribute("checkcode"); String veryCode = request.getParameter("c"); PrintWriter out = response.getWriter(); if (veryCode == null || "".equals(veryCode)) { out.println("请输入验证码!"); } else { if (validateC.equals(veryCode)) { out.println(1); } else { out.println("验证码输入错误!"); } } out.flush(); out.close(); } }

磊哥哥哥哥 LV13
2023年4月6日
xiaojin2 LV2
2021年3月3日
a850738958 LV9
2020年12月11日
19980918 LV1
2020年1月11日
C544350851 LV26
2019年9月30日
yyyyyyyyyyyyyyyyyyy LV16
2019年7月3日
kelaishite LV2
2019年6月24日
liuliuliuliuliu LV2
2019年5月21日
xiong517461801 LV2
2019年4月18日
8战魂5无双8 LV43
2019年2月24日