File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes how to call properties file in an application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how to call properties file in an application" Watch "how to call properties file in an application" New topic
Author

how to call properties file in an application

vijay joseph
Greenhorn

Joined: Feb 26, 2007
Posts: 18
hi friends,
i am new to struts,can anybody tell how to call or use the .properties file in the application , i have placed in web-inf folder , is there any method to call the properties file?
sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 179
Hi,
Use the following in the Action Class:

MessageResources messageResources = getResources(request) ;
or
MessageResources messageResources = getResources(request, "bundleName")

messageResources.getMessage("key1");

regards
sudha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call properties file in an application
 
Similar Threads
Properties
How To Access struts Properties file
Properties file path hard coded
Internatonalization in Liferay
how to call .properties file in ResourceBundle class