Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call properties file in an application

 
vijay joseph
Greenhorn
Posts: 18
  • 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
  • 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