struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Xin Chen <>
Subject Re: How to Create an ActionError with a text message
Date Thu, 23 Aug 2001 23:25:28 GMT
Hello Rajan,

Copied from other's post:

Add in the file an entry like
   error.exception = "Exception: {0}".

Then when I create the error I use
        catch (Exception e) {
            ActionErrors errors = new ActionErrors();
            errors.add(ActionErrors.GLOBAL_ERROR, new
            ActionError("error.exception", e.getMessage()));
            saveErrors(request, errors);
            return mapping.findForward("failure");

Wednesday, August 22, 2001, 3:12:06 PM, you wrote:

RG> ActionError normally takes a key to a property in ApplicationResources
RG> file. But I would like to report errors without putting all the errors in
RG> the properties file.

RG> I would like to continue to use the <html:errors/> tag.

RG> Is there a way of reporting errors from an Action which can be reported by
RG> <html:error/> without putting the message string in the resource?

RG> Thanks for your help,
RG> Rajan

RG> __________________________________________________
RG> Do You Yahoo!?
RG> Make international calls for as low as $.04/minute with Yahoo! Messenger

Best regards,

View raw message