title: BIRT is not finding .properties file containing localization at runtime (servlet)
body: <p>I have set up a BIRT (3.7) servlet as described here: <a href="http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1" rel="nofollow">http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1</a>.</p>
  
  <p>In my report, I declared a property file resource and localized the report's labels. I created a default properties file which contains German and an 'en_GB' file containing English. In the Preview section this worked ok.</p>
  
  <p>I deployed the web application to a Websphere server but here no localized texts are displayed when the report is rendered. Labels display their unlocalized texts and texts fetched by JavaScript are all 'null'.</p>
  
  <p>I assume that the properties files are not being found.</p>
  
  <p>Is there anything that I must do in the servlet to tell BIRT where to look for resources? e.g. adding context root to file names.</p>
  
  <p><strong>Solution</strong></p>
  
  <p>Thanks to @Dominique for the <code>setResourcePath</code> tip. I had to make a couple of other changes too.</p>
  
  <ul>
  <li>In the report resources I had declared 'WebContent/birt/propfile'. Changed this to simply 'propfile'.</li>
  <li>Had been passing the parameter '__locale' to the report. Defined a new parameter 'Locale' and used this instead.</li>
  <li>Added <code>beforeFactory</code> script: <code>reportContext.getDesignHandle().setStringProperty("locale", params["Locale"].value);</code></li>
  <li>Added following to servlet: <code>birtReportEngine.getConfig().setResourcePath(request.getContextPath() + "/birt");</code></li>
  </ul>