I have developed a screen to authenticate user using Struts2 Jquery Plugin. It is partially loaded in to target div. In case of success everything is fine but in case of failure i don't know what to do. The documentation doesn't talk anything about it at all.
@Action(value = "/validate-login", className = "LoginAction", results = {
@Result(location = "startup-after-login.jsp", name = "success") })
public String execute() throws Exception {
super.addActionError("test");
throw new Exception();
//return SUCCESS;
}
service.validateUser
might throw an exception when authentication fails. Not sure how to handle those and show it as error in front end.
There is one more link which talks about it but i couldn't get it working successfully.
strust 2 (jquery plugin) show action exceptions as ajax error
Thanks for your help.