I would like to put in the ActionErrors object regular errors that may happen and also
an exception without loosing the previously stored errors.
These are the steps I am taking and the results I am getting:
1. Errors occur so I add them to the ActionErrors with the GLOBAL_ERROR property:
ActionErrors myActionErrors = new ActionErrors();
myActionErrors.add(ActionErrors.GLOBAL_ERROR, new ActionError("test.error"));
myActionErrors.add(ActionErrors.GLOBAL_ERROR, new ActionError("test.error2"));
saveErrors(request, myActionErrors);
2. An exception is thrown:
catch(Exception e)
{
throw new TestException("this was a test Exception",e);
}
3. The exception is handle by the ExceptionHandler defined in the config file:
<!-- Test Exception Handdler -->
<action path="/test"
type="edu.miami.BaseAction">
<exception
type="edu.miami.exceptions.TestException"
key="test.exception"
path="/testExceptionError.jsp" />
<forward name="success" path="/testExceptionNoError.jsp" />
</action>
4. When I try to output the information in the JSP using the errors tag only
information about the exception is diplayed. test.error and test.error2 seems as if
they were gone.
<html:errors />
How can I keep both, errors and the exception in hte ActionErrors object, or
how can I access them if they are there already?
Also I would like to find out under which property is the exception information kept
in the ActionErrors because when I try to output
<html:errors property="<%=ActionErrors.GLOBAL_ERROR%>" />
the exception information is not shown, so it must be under some other property.
Thanks
Jorge Luis
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]