title: How to read a file one step back of project folder in Java
body: <p>I want to read a file from a path one step back of the project folder when deployed on tomcat server.
  For eg:</p>
  
  <p>Project folder : </p>
  
  <pre><code>apache-tomcat-7.0.63/webapps/Test/index.jsp
  </code></pre>
  
  <p>Now i want to read a file which is in webapps folder </p>
  
  <pre><code>apache-tomcat-7.0.63/webapps/test.xml
  </code></pre>
  
  <p>using</p>
  
  <pre><code>File inputFile = new File(getServletContext().getRealPath("test.xml"));
  </code></pre>
  
  <p>How can i implement this.</p>
  
  <p>Thanks in advance.</p>