public String execute() { try { System.out.println("Show User Statistics Action"); userStatistics = userManager.showUserStatistics(); return SUCCESS; } catch (Exception e) { e.printStackTrace(); return ERROR; } }
public String execute() { System.out.println("Login Action"); User user = userManager.loginUser(userForm); if (user != null) { session().setAttribute("userid", user.getUserId()); session().setAttribute("username", user.getUsername()); if (user.getQualifications() == 1) { return SUCCESS; } else { return "ACTIVE"; } } else { return ERROR; } }