@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		log.debug(TAG + "is invoked");
		String userName = request.getParameter("username");
		String password = request.getParameter("password");
		String sex = request.getParameter("sex");
		if(userName == null) {
			System.out.println("no username!");
		}
		if(qs.registerUser(userName, password, sex)) {
			response.getWriter().print("1");
		} else {
			response.getWriter().print("0");
		}
	}