title: JasperReports localization
body: <p>I'm using <em>JasperReports</em> and want to generate report in different languages but there is a problem occurred. </p>
  
  <p>And this is my code</p>
  
  <pre class="lang-java prettyprint-override"><code>public void initQueryReport() throws JRException, ParseException {
      try {
          Map param = new HashMap();
          param.put("DATE", date2);
          fill1 = JasperFillManager.fillReport(
                  "E:\\jasper reports\\employees.jasper", param, connection);
      } catch (Exception e) {
          System.out.println();
      }
  }
  
  ServletResponse respnce;
  HttpServletResponse respons;
  
  public void PDFQuery(ActionEvent event) throws JRException, IOException, ParseException {
      try {
          initQueryReport();
          respnce = (ServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
          respons = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
          respons.setContentType("application/pdf");
          respons.setHeader("Content-Disposition", "inline");
          respons.setContentType("application/pdf");
          ServletOutputStream out = respnce.getOutputStream();
          JRPdfExporter pdf = new JRPdfExporter();
          pdf.setParameter(JRExporterParameter.JASPER_PRINT, fill1);
          pdf.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
  
          pdf.exportReport();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>I created a properties file with name <strong><em>localizationdemo.prperties</em></strong> contains text I want in the language used and I put this file in <em><code>src</code></em> folder.</p>
  
  <p>When I run the application and click link that generates the report the following exception: </p>
  
  <pre><code>net.sf.jasperreports.engine.JRException: No input source supplied to the exporter
  </code></pre>
  
  <p>Note when I run the application in debugging mode i have the following exception details:</p>
  
  <pre><code>java.util.missingresourceexception can't find bundle for base name locale en_us
  </code></pre>
  
  <p>Please help me to solve this problem. And thx a lot</p>