>You can use the ActionMessage constructor that takes a string and a
>boolean indicating whether or not the string is a key to be looked up
in
>a resource bundle. By setting this to false, the string is taken as a
>literal.
>
>public ActionForward execute(ActionMapping mapping, ActionForm form,
> HttpServletRequest request, HttpServletResponse response){
> ...
> String myMessage = ...; // app logic that returns a string
>
> ActionMessages errors = new ActionMessages();
>
> // use GLOBAL_MESSAGE if message does not pertain to a
>specific property
> errors.add(ActionMessages.GLOBAL_MESSAGE, new
>ActionMessage(myMessage, false));
> saveErrors(request, errors);
>}
Okay, but how do I use internationalization from my property files?
In Version 1.0 or so, I used:
>ActionErrors errors = new ActionErrors();
>errors.add("MyError", new ActionError("error.MyError") );
>saveErrors(request,errors);
But that is deprecated.
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]