File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call properties file in an application

 
vijay joseph
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 186
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Use the following in the Action Class:

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

messageResources.getMessage("key1");

regards
sudha
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic