protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String type = request.getParameter("type");
		HttpRequest req = Enum.valueOf(HttpRequest.class, type.trim());
		IprocessHttpRequest iRequest = null;
		HttpSession session = request.getSession();
		String url = "2.0/index.jsp";
		System.out.println(req);
		switch (req) {
		case login:
			String vcode = (String) session.getAttribute("rand");
			String svcode = (String) request.getParameter("verifycode");
//			System.out.println(vcode + " " + svcode);
			if(vcode.equals(svcode))
			{
				iRequest = new LoginController();
				if(iRequest.process(request)){
					System.out.println("success");
				}else {
					System.out.println("failed");
				}
				response.sendRedirect("2.0/index.jsp");
			}else {
				response.sendRedirect("2.0/login.jsp");
			}
			break;
		case addtimenode:
			iRequest = new TimeController();
			iRequest.process(request);
			url = request.getHeader("Referer");
			response.sendRedirect(url);
			break;
		case deletetimenode:
			iRequest = new TimeController();
			iRequest.process(request);
			url = request.getHeader("Referer");
			response.sendRedirect(url);
			break;
		case edittimenode:
			iRequest = new TimeController();
			iRequest.process(request);
			url = request.getHeader("Referer");
			response.sendRedirect(url);
			break;
		case editeventnode:
			iRequest = new EventController();
			iRequest.process(request);
			url = request.getHeader("Referer");
			response.sendRedirect(url);
			break;
		case logout:
			session.setAttribute("user", "");
			url = request.getHeader("Referer");
			response.sendRedirect(url);
			break;
		default:
			break;
		}
	}