I guess my question has to do with an error response from the EJB
Container too. I'm getting an Error
Response (String) from the EJB Container and I'd like to display it like
I display the other validation errors? Any ideas on how to do that?
This is what I tried so far (which did not work!):
ActionErrors errors = new ActionErrors();
errors.add("error", new ActionError("error",
myResponse.getReason()));
// Report any errors we have discovered back to the original
form
if (!errors.empty()) {
saveErrors(request, errors);
return (new ActionForward(mapping.getInput()));
}
-----Original Message-----
From: suhas [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 6:31 AM
To: [EMAIL PROTECTED]
Subject: Re: ActionError
Yes . certainly . U can put that ActionErrors object in the request
object
like - saveErrors(req,res) in ur Action Class
Which in turn saves the ActionErrors in the request object with key
as
"org.apache.struts.action.ERROR"
So in the Jsp page u can print those errors using <html:errors /> tag
But anyone want to comment on how the errors returned from data
yer( EJBException ) handled ?
----- Original Message -----
From: gdelgado <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 10:09 PM
Subject: ActionError
> Is there any way that I can use the ActionErrors and ActionError to
display
> error messages that I get from the back-end of my application.
>
> For Example:
> if I get an error message I would like to do something like this.
>
> ActionErrors ae = new ActionErrors();
>
> if(myResponse.getStatus().equals("ERROR")){
> ae.add("reason", new ActionError(myResponse.getReason()));
> }
>
> ...That way I can show the reason for the error like the other
error
> handlers do?
>
> thanks in advance.
> Gus