aspose 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 Java 8 in Action this week in the Java 8 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
 
jQuery in Action, 2nd edition
 
subject: how to call properties file in an application
 
Similar Threads
how to call .properties file in ResourceBundle class
Properties
How To Access struts Properties file
Properties file path hard coded
Internatonalization in Liferay