• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting Relative path of Properties file in code.  RSS feed

 
Dushyant Chhetri
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running a web Application and want to keep the SQL Queries in a properties file.
Now I am having a problem to load the properties file and getting a .


My code snippet is here , Please help:




I am getting the sysout given above to



Running the cod elocaly via a main method is able top fetch the properties file
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use absolute path instead, the following statement:



will return the absolute path of the current web app.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!