File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes how to access resource file configured in struts-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to access resource file configured in struts-config.xml" Watch "how to access resource file configured in struts-config.xml" New topic
Author

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

Viju Purushothaman
Greenhorn

Joined: Dec 16, 2013
Posts: 1

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to access resource file configured in struts-config.xml