Why is this an issue?  Just to put any error.header or error.footer in
the properties file.

If you must, the following will get you the list of errors:

         ActionErrors ae = (ActionErrors)
request.getAttribute(Action.ERROR_KEY);

Edgar

-----Original Message-----
From: Markus Pedratscher (WebBS) [mailto:markp@;webbs.tv] 
Sent: Friday, November 15, 2002 5:56 AM
To: '[EMAIL PROTECTED]'
Subject: How to access ActionErrors from within FormAction


Hi,
I'm fairly new to struts and I'm having the following problem.

I want to display an error message in an js alert box. My understanding
is that I can't do that with </errors> because if wraps the error.header
and .error.footer around each message and does not have an attribute to
disable this behavior.

Therefore what I want to do is to get the message from
application.properties and then store it in the form bean. The problem
is that I can't figure out which class/method to use to read the message
from application.properties (from within my formAction). I'm looking for
something like this:

String messageText = messageContext.getMessage(messageKey);

Can anyone help?
Thanks
Markus


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to