Scope, scope, scope. Once you're in your Action class, you are in the
business logic scope of your application. Your business logic should have
nothing to do with Struts, or any other non business related architectural
implementation ( such as Swing, JAAS, etc...), architecturally speaking. So,
use the classes and methods used for manipulating any other properties file,
which is just what the ApplicationResources.properties file is, no more, no
less. For more info see the Properties class , and the supporting classes
Property*. Reading can be as  easy as:
...
PropertyResourceBundle p = new PropertyResourceBundle( new
FileInputStream("ApplicationResources.properties") );
...
String propertyValue = p.getString("myKeyName");
...

Hope this helps.
Mark
----- Original Message -----
From: "Michael Mehrle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 12:01 AM
Subject: Can I directly access properties in my ApplicationResources file?


> Okay, I'm in my Action class and would like to access some application
> specific configuration settings stored in my ApplicationResources.config
> file . What method do I call from my Action subclass in order to get to
> those? I have been looking all over the place and can't make sense out of
> this...
>
>
>
> --
> 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]>

Reply via email to