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

How to access properties file from WEB-INF/ directory  RSS feed

 
Shivkalyan Chavan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am unable to access properties file..

Suppose my project folder contains following path

Test/com/General
Test/WEB-INF
Test/com/Properties

Test is project folder and General and Properties and packages..

I have put 'project-properties.properties' file in Test/com/Properties file..I want to access the variable and respective values in java program..how to access..?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the properties file is not on the classpath built by the container (which it won't be in that directory), then you'll need to look at context.getResourseAsStream to read the properties file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!