private String performTheAction(HttpServletRequest request) {
		HttpSession session = request.getSession(true);
		String servletPath = request.getServletPath();
		CustomerBean customerBean = (CustomerBean) session
				.getAttribute("customer");
		EmployeeBean employeeBean = (EmployeeBean) session
				.getAttribute("employee");
		String action = getActionName(servletPath);

		// System.out.println("servletPath="+servletPath+" requestURI="+request.getRequestURI()+"  user="+user);

		if (action.startsWith("c_") && customerBean != null) {
			return Action.perform(
					action.equals("c_login.do") ? "c_viewAccount.do" : action,
					request);
		}
		if (action.startsWith("e_")) {
			if (employeeBean != null) {
				return Action.perform(action, request);
			} else
				return Action.perform("admin_login.do", request);
		}
		if (action.equals("admin_login.do")) {
			return Action.perform(employeeBean != null ? "e_customermanage.do"
					: action, request);
		}
		if (action.equals("c_login.do") && customerBean == null) {
			return Action.perform(action, request);
		}

		return Action.perform("entry.do", request);

		/*
		 * if (customerBean == null) { // If the user hasn't logged in, direct
		 * him to the login page if (employeeBean == null) return
		 * Action.perform("c_login.do", request); else return
		 * Action.perform(action, request); }
		 */
		// Let the logged in user run his chosen action
		// return Action.perform(action, request);
	}