title: Java - Relative path of a file in a java web application
body: <p>I want to read a file from a java web application. I don't want to give the absolute path of the file. I just want to put the file in some directory of my web application.</p>
  
  <p>Or</p>
  
  <p>It can be placed along with .war file (packaged web application).</p>
  
  <p>What relative path to give for the file. I tried <code>./filename.csv</code> but it didn't work.</p>
  
  <p>========<h3>Updated</h3>========</p>
  
  <p>I will deliver a <code>WAR</code> file (packaged web application) to my client. This web application will read a file (lets say <code>SuppliedFile.csv</code>) which will be copied to the server by the client. So I need a mechanism (that will work irrespective of whether the application server will unpak the <code>WAR</code> or not) so that web application can read that file.</p>
  
  <p><b>Note:</b>
  I am not using the <code>SuppliedFile.csv</code> in a servlet... I am using it in a plain Java class...</p>