You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by leo mj <le...@yahoo.com> on 2006/09/08 13:08:42 UTC

How to access in ActionClass

hi all,

 Anyone knows how to access <message-resources> parameter in struts-config.xml through Action class??? other than using XML reader class.is there any feature in struts framework to do so????
That is i need to modify the <message-resources> parameter value based on some logic in Action class.

Regards,
Leo





 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

Re: How to access in ActionClass

Posted by leo mj <le...@yahoo.com>.
robert,
   
  I guess you are mentioning the way to access ApplicationResources.properties...
  Correct me if i am wrong...
   
  Or is it a way to access struts-config.xml elements???
   
  Regards,
  Leo

Robert Harrison <rh...@gmail.com> wrote:
  Leo,
Hope I understood the question. If so, this:
ResourceBundle resource = ResourceBundle.getBundle
("nameOfYourResourceBundle");

You can then access the bundle using its keys:
Properties properties = new Properties();
properties.put("yourVariableName",resource.getString("bundleKey"));

Bob

On 9/8/06, leo mj wrote:
>
> hi all,
>
> Anyone knows how to access parameter in
> struts-config.xml through Action class??? other than using XML reader
> class.is there any feature in struts framework to do so????
> That is i need to modify the parameter value based on
> some logic in Action class.
>
> Regards,
> Leo
>
>
>
>
>
>
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com. Check it out.
>



-- 
"In theory there is no difference between theory and practice. In practice
there is."
Yogi Berra

Bob


 		
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

Re: How to access in ActionClass

Posted by Robert Harrison <rh...@gmail.com>.
Leo,
Hope I understood the question. If so, this:
ResourceBundle resource = ResourceBundle.getBundle
("nameOfYourResourceBundle");

You can then access the bundle using its keys:
Properties properties = new Properties();
properties.put("yourVariableName",resource.getString("bundleKey"));

Bob

On 9/8/06, leo mj <le...@yahoo.com> wrote:
>
> hi all,
>
> Anyone knows how to access <message-resources> parameter in
> struts-config.xml through Action class??? other than using XML reader
> class.is there any feature in struts framework to do so????
> That is i need to modify the <message-resources> parameter value based on
> some logic in Action class.
>
> Regards,
> Leo
>
>
>
>
>
>
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com.  Check it out.
>



-- 
"In theory there is no difference between theory and practice. In practice
there is."
Yogi Berra

Bob