标签:coding exception iter string ash session https rac encoding
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.setCharacterEncoding("utf-8");
String phone = req.getParameter("phone");
String code = GetMessage.getCode(phone);
//手机号登录后
HttpSession session = req.getSession();
PrintWriter out = resp.getWriter();
//检查手机号是否注册过
checkPhoneDao checkPhoneDao = new checkPhoneImpl();
boolean results = checkPhoneDao.checkPhone(phone);
if(!results){
out.print(code);
session.setAttribute("name", "phone");
}else {
out.print("此手机号没有被注册");
}
out.close();
}
————————————————
标签:coding exception iter string ash session https rac encoding
原文地址:https://www.cnblogs.com/hyhy904/p/11426865.html