@WebServlet("/login")
public class LoginController extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {
response.setCharacterEncoding(“UTF-8”);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("");
stringBuilder.append(“登录名称:<input type=‘text’ name=‘loginName’ value’’>
”);
stringBuilder.append(“登录密码:
”);
stringBuilder.append("");
stringBuilder.append("");
stringBuilder.append("");
showMsg(response,stringBuilder.toString());
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.setCharacterEncoding("utf-8");
String loginName = req.getParameter("loginName");
String lo