title: java.io.FileNotFoundException: db.properties (The system cannot find the path specified)
body: <p>I have written a basic jsp code for storing and retrieving the data from db.
  Before that am checking validation of user.</p>
  
  <p>When i click submit button it will redirect to my jsp page.</p>
  
  <p>i have written a db.properties file separately.</p>
  
  <p>When i gave complete path to read properties file., program is executing fine. (Which is not best way to hard code like below).</p>
  
  <p>FileInputStream in = new FileInputStream("C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\<strong>ServiceDisplay</strong>\db.properties"); </p>
  
  <p>But when i specify only "db.properties" like 
  (FileInputStream in = new FileInputStream("db.properties");) program is not executing i got <strong>file not found exception</strong>.</p>
  
  <p>Please not this properties file is in current working dir only. (i.e., my db.properties file and my jsp file is under <strong>ServiceDisplay</strong></p>
  
  <p>I tried to changing the file name as "//db.properties", "/db.properties", "./db.properties", "\db.properties", .\db.properties, ../db.properties",  "..\db.properties" .
  But still i am getting <strong>java.io.FileNotFoundException: db.properties</strong></p>