title: tomcat 5.5 - problem with reading resource files
body: <p>I'm using Tomcat 5.5 as my servlet container. My web application deploys via .jar and has some resource files (textual files with strings and configuration parameters) located under its WEB-INF directory. Tomcat 5.5 runs on ubuntu linux. The resource file is read with a file reader:<br>
  <code>fr = new FileReader("messages.properties");</code></p>
  
  <p>The problem is that sometimes the servlet can't find the resource file, but if i restart it a couple of times it works, then again after some time it stops working.
  Can someone suggest what's the best way of reading resource strings from a servlet? Or a workaround for this problem?
  Putting the resource files under WEB-INF/classes doesn't help either.</p>