throws ServletException, IOException {
String username=request.getParameter("username");
String userpwd=request.getParameter("userpwd");
Usert user=new Usert(username,userpwd);
HttpSession session=request.getSession(true);
if(new UserDAO().AddUser(user)){
session.setAttribute("user","注册成功");
response.sendRedirect("loginok.jsp");
}else{
session.setAttribute("err", "注册失败!");
response.sendRedirect("reg.jsp");