title: how to get relative path of current directory in tomcat from linux environment using java
body: <p>I would like to use to read properties file from out side of the my web application. 
  I was deployed a war file in tomcat in windows environment and I am able to read properties file from outside of my web application using following code.</p>
  
  <pre><code>//(Method 1.)
  String filePath = 
  new java.io.File( ".").getCanonicalPath()+"/webapps/strsproperties/strs.properties";
  // or  
  //(Method 2.)
  String filePath = new File(System.getProperty("catalina.base"))+ "/webapps/strsproperties/strs.properties";
  
  InputStream inputStream = null;
  inputStream = new FileInputStream(filePath);
  properties.load(inputStream);
  String application = properties.getProperty("applications");
  </code></pre>
  
  <p>In above both case's I am able to read filePath in windows. </p>
  
  <p>Problem is I am not able to read filePath in Linux using 1st method ( relative path) process.</p>
  
  <p>Is there any way to read file using relative path in tomcat from Linux env ?. </p>