title: How to write properties file in Java web application?
body: <p>I want to write some values to properties file which is located in WEB-INF folder.
  Following is my code-</p>
  
  <pre><code>Properties result = new Properties();     
  result.setProperty(user, value);
  result.store(new FileOutputStream(getServletContext().getRealPath("/WEB-INF/properties.props").trim()), null);
  </code></pre>
  
  <p>Whenever i run my code,there is no data in properties file.
  It shows an empty file.</p>
  
  <p>Please let me know how to write properties file in java web application.</p>