1

I am working on a web project. I want to know where should I put my property file. I will use it for filters. I attached a screenshot of my project too. Thanks!

My project

Faraz
  • 6,025
  • 5
  • 31
  • 88
  • Unable to see attachment – Bhargav Kumar R Jun 26 '15 at 10:15
  • @BhargavKumarR http://i.stack.imgur.com/6d8Km.jpg Do you see it now i copied it here. – Faraz Jun 26 '15 at 10:16
  • Not able to see..better you insert in ur question – Bhargav Kumar R Jun 26 '15 at 10:17
  • @BhargavKumarR : I tried that but the website said I need 10 reputation to attach any pictures. So there is that. – Faraz Jun 26 '15 at 10:20
  • @BhargavKumarR thanks xD i attached it. – Faraz Jun 26 '15 at 10:26
  • It depends entirely on how you load (or intend to load) the properties file in the first place. If you load it using the ClassLoader, then place it in the sources, with your Java files. If you load it as a webapp resource, using the ServletContext, place it under WebContent/WEB-INF. If you want it to be avdownloadable from the browser, then put it anywhere under WebContent, except in WEB-INF. – JB Nizet Jun 26 '15 at 10:31
  • @JBNizet Thank you kind Sir, It's loaded now and working. Thanks – Faraz Jun 26 '15 at 10:41
  • @BhargavKumarR Thanks to you too. – Faraz Jun 26 '15 at 10:41

1 Answers1

0

It depends entirely on how you load (or intend to load) the properties file in the first place. If you load it using the ClassLoader, then place it in the sources, with your Java files. If you load it as a webapp resource, using the ServletContext, place it under WebContent/WEB-INF. If you want it to be avdownloadable from the browser, then put it anywhere under WebContent, except in WEB-INF. – JB Nizet https://stackoverflow.com/users/571407/jb-nizet

Community
  • 1
  • 1
Faraz
  • 6,025
  • 5
  • 31
  • 88