Take a look at the source code for MessageResources and it's default implementation PropertyMessageResources. You'll gain an appreciation for why this won't work (by default) and doing it yourself would be (what I consider) a non-supported modification ;)
I'm not trying to discourage you. I know exactly how to do this. I just can't see WHY you need to do this. I've written my own MessageResources implementation (DBMessageResources) which allows you to store and retrieve the key-value pairs in a database. I'm almost finished with the second (XMLMessageResources). Good luck with it and let me know what you decide. Cheers, James "Sasquatch on crack" Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the "Open Minded Developer Network" http://www.open-tools.org/struts-atlanta > -----Original Message----- > From: Juraj Kazda [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 10:36 AM > To: Struts Users Mailing List > Subject: RE: The name of application resources? > > > Hello James. > > Yes, I suppose to use it in action class. This action class is > responsible for changing the Locale/language of application. I know, > that if I try to change to language which appropriate message file is > not available, default .properties file will be used. However, I use > logging in my action class and I want to log something like - "No such > resources available". I just want to try to check if that file exists > (the name from message-resource element + parameter from reguest) and if > not, log that. > > -jerryk. > > > > ===================== > Juraj Kazda > ICQ : 135207538 > ===================== > > > > -----Original Message----- > > From: James Mitchell [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, September 17, 2002 4:27 PM > > To: Struts Users Mailing List > > Subject: RE: The name of application resources? > > > > > > Perhaps it would be better to explain what you want to do > > before you do > > this. > > > > Why do you need to extract the name? Are you needing this in > > your action > > class? > > > > James Mitchell > > Software Engineer\Struts Evangelist > > Struts-Atlanta, the "Open Minded Developer Network" > > http://www.open-tools.org/struts-atlanta > > > > > > > > > > > -----Original Message----- > > > From: Juraj Kazda [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, September 17, 2002 9:05 AM > > > To: STRUTS-USER (E-mail) > > > Subject: The name of application resources? > > > > > > > > > Hello everyone, > > > > > > I'm new to Struts and while discovering its magic I have > > short question: > > > > > > > > > Is it possible to get the name of file with internationalized > > > messages (ie. ApplicationResources.properties, or > > generally, the name > > > set up in message-resources element of strusts-config.xml)? > > > > > > > > > I found something like org.apache.struts.config.MessageResources in > > > documentation, but how can I obtain instance of this class valid for > > > actual application? > > > > > > Thank you very much. > > > > > > > > > -jerryk. > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

