hi,
What type of exceptions you want to handle?
<html:errors> is normally used for form validation.
<html:text property="name"/><html:errors property="name"/>
you can put code like this in the JSP, so that if there is any error with the data you entered in the name field can be notified to the user.
if you simply put <html:errors> , it will display all the errors.
You must create this error entries either in your Form or Action.
validate()
{
ActionErrors errors = new ActionErrors();
if (name.length()==0 || name == null)
errors.add("name",new ActionError("error.emptychk"));
return errors;
}
if you want handle other error cases associated with the action, you can put the code in try-catch blocks and inside the block you can write the code for forwarding to a corresponding error pages
try
{
.........
..........
}
catch(Exception e)
{
mapping.findForward("error");
}
Also you can associate some Exceptions with an action. You can define each oof these exceptions with the help of a Custom exception class or an Existing Exception class. You can also specify where you forward on these exceptions.
Hope this will help you.
Regards,
Martin