If I understand correctly:
- Your error messages are defined in the ApplicationResources.properties
file.
- You have the property name (key) for the error message you want
- You're in the Action class and want to access the error message.
Given that:
MessageResources messages = getResources();
String errorText = messages.getMessage(error.message.key) ;
At least the 1.02 release. Don't believe this has changed for 1.1
Best of luck!
FWIW -
Kevin
Yugandhar_Reddy [EMAIL PROTECTED] on 05/13/2002 08:08:56 AM
Please respond to Struts Users Mailing List
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject: how to access the properties file from the action class
Hi
I need to read the error messages from the properties file from my action
class.
I will be having the key of the message in my action class. I need to read
the value of that key from the properties file in my action class.
Thanks in advance,
Yug
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]