Hi,
I have
a login page. If the login fails, I want to show the errors next to the specific
field (if username is wrong, the error is shown next to username field, etc.) I
am using programmatic exception handling.
try
{
service.authenticate(userName, password) ;
} catch (InvalidLoginException ile) {
System.out.println("adding action errors in action class") ;
ActionErrors errors = new ActionErrors();
errors.add( "userName", new ActionError("invalid.login") );
saveErrors( request, errors );
return mapping.findForward("Failure") ;
}
service.authenticate(userName, password) ;
} catch (InvalidLoginException ile) {
System.out.println("adding action errors in action class") ;
ActionErrors errors = new ActionErrors();
errors.add( "userName", new ActionError("invalid.login") );
saveErrors( request, errors );
return mapping.findForward("Failure") ;
}
How
should I access these errors in my JSP to show the errors?
Thanks,
Suresh
**************************Disclaimer************************************************** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited.
****************************************************************************************
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>