Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing property file from outside Application Context  RSS feed

 
Ahmed Basheer
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a property file stored somewhere on disk say c:\tmp\file.properties. This property file contains name value strings e.g
version=6.0 etc.. I need to access this file from JSF page and access the values of the given names(key's).This property file is not localized. I can not use <f:loadbundle basename....> because basename only loads the file which are in the web application context, that is basename point to property file under WEB-INF/classes only, but my property file is outside application context and infact it is under c:\tmp. Is there any easier way to access this file and access its contents as name/value pairs.

Help Appreciated.
-Basheer
 
sunil verma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you can use core java api for accesing the property file. try to access the property file within the constructor of the bean and than try to set the values of the components.

But why do you want to put the it outside the application context does it have any advantage.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!