• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to access resource file configured in struts-config.xml  RSS feed

Viju Purushothaman
Posts: 1
Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Please help me with my following issue.

I have configured message resource in my struts-config.xml and now I need to access the resource properties from java file?
For the time being I am using the following code to access the resource properties.

protected static MessageResources messages = MessageResources.getMessageResources("resources.myfile");
where "myfile.properties" under "resources" package is my resource file.

But I don't want to specify the file name ("resource.myfile" in my case) inside java code instead I would like to access the object that is being configured in struts-config.xml.
Something similar in the <bean:write> code.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!