Map session = actionInvocation.getInvocationContext().getSession(); User user = (User) session.get(Constants.USER_KEY); boolean isAuthenticated = (null!=user) && (null!=user.getDatabase()); if (!isAuthenticated) { return Action.LOGIN; } else { return actionInvocation.invoke(); }