title: How to get to a local file in servlet
body: <p>I setup Tomcat server locally and I placed my text file in my C drive (c:\test\myfile.txt).</p>
  
  <p>In my servlet, I specify the exact path to the file to read it. I successfully do that.</p>
  
  <p>My question is, where should I place the txt file before deployment and  how can I navigate to it to read it?
  I did a test and ran on my local Tomcat</p>
  
  <pre><code>System.out.println("Working Directory = " +
                System.getProperty("user.dir"));
  </code></pre>
  
  <p>and it showed me the Eclipse folder! maybe because  I run tomcat through eclipse. So I am sure there is either a spcific folder for data or maybe I should create one somewhere in the file system but I need to the relative path.</p>
  
  <p>Any suggestion is appreciated</p>