protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		String username = request.getParameter("username");
		String password = request.getParameter("password");
		String email = request.getParameter("email");
		String firstName = request.getParameter("firstName");
		String lastName = request.getParameter("lastName");
		String mobile = request.getParameter("mobile");

		String role = request.getParameter("role");

		if (!username.isEmpty() && !password.isEmpty() && !email.isEmpty()
				&& !firstName.isEmpty() && !lastName.isEmpty()) {

			IUserDAO userDAO = new UserDAO();
			EmailValidationUtil emailValidation = new EmailValidationUtil();
			PasswordValidationUtil passwordValidation = new PasswordValidationUtil();

			if (!userDAO.isExistsByEmail(email)
					&& !userDAO.isExistsByUsername(username)
					&& emailValidation.isNormalEmail(email)
					&& passwordValidation.isNormalPassword(password)) {

				User user = new UserEntity();
				user.setPassword(password);
				user.setUsername(username);
				user.setEmail(email);
				user.setLastName(lastName);
				user.setFirstName(firstName);
				user.setMobile(mobile);
				user.setIsActive(true);
				user.setCreateDate(new Date());

				// userDAO.save(user);

				IAdminDAO adminDAO = new AdminDAO();
				Admin admin = new AdminEntity();
				admin.setUser(user);
				admin.setRole(role);

				System.out.println("****************");
				adminDAO.save(admin);

				RequestDispatcher requestDispatcher = request
						.getRequestDispatcher(SUCCESS_PAGE);
				requestDispatcher.forward(request, response);
			} else {
				RequestDispatcher requestDispatcher = request
						.getRequestDispatcher(ADMIN_REGISTRATION_PAGE);
				requestDispatcher.forward(request, response);
			}

		} else {
			RequestDispatcher requestDispatcher = request
					.getRequestDispatcher(ADMIN_REGISTRATION_PAGE);
			requestDispatcher.forward(request, response);
		}

	}