> What is the placeholder character that will get replaced in the error
> message string?

The placeholder is {D}, where D is a digit between 1 and 5.

In other words, you might have something like this in your
ApplicationResources.properties:

        error.basic=An error occured, here is some info: {0}

This allows you to add one extra bit of info to the error text.  If you want
to add two, do this:

        error.detailed=An error occured, here is some info: {0} <br/>Error code:
{1}

You would have something like this in your ActionClass:

        ActionErrors errors = new ActionErrors();
        
        // to report the first error (error.basic)
        errors.add(ActionErrors.GLOBAL_ERROR,
           new ActionError("error.basic", e.toString()));
        
        // to report the second error (error.detailed)
        errors.add(ActionErrors.GLOBAL_ERROR,
           new ActionError("error.basic", e.toString(), "BitRot in ActionClass"));
        
        // Report any errors we have discovered back to the original form
        if (!errors.empty())
        {
           saveErrors(request, errors);
           return(new ActionForward(mapping.getInput()));
        }

Make sense?

Tom

>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to