title: JSP call Crystal Report Viewer
body: <p>I have a problem with call crystal reports viewer from JSP, this is my project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/WAghz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WAghz.png" alt="Project Structure"></a></p>
  
  <p>CrystalReport-viewer.jsp can call the crystal reports viewer (file in web content) but my file with name Viewer1.jsp cannot call the crystal reports viewer. Why? because the directory folder jsp? the error show:</p>
  
  <pre><code>The viewer was unable to find the resources required to render the report.
  Please check the following to resolve the issue.
  1. Verify that ../crystalreportviewers/ is accessible to your WebApp and is the correct path to the viewer resources.
  2. You may customize this location by altering the crystal_image_uri and crystal_image_use_relative properties in the web.xml.
  3. Validate that the file crv.js exists at ../crystalreportviewers/js/crviewer/crv.js.
  </code></pre>
  
  <p>Viewer1.jsp</p>
  
  <pre><code>&lt;%
      String report_name = "/modules/testing/Report2016.rpt";
  
      ReportClientDocument reportClientDoc = new ReportClientDocument();
      reportClientDoc.open(report_name, OpenReportOptions._openAsReadOnly);
  
      ParameterFieldController parameterFieldController = reportClientDoc
              .getDataDefController().getParameterFieldController();
  
      CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
      IReportSource reportSource = reportClientDoc.getReportSource();
      crystalReportPageViewer.setReportSource(reportSource);
      crystalReportPageViewer.setReportSource(reportSource);
      crystalReportPageViewer.setOwnPage(true);
      crystalReportPageViewer.processHttpRequest(request, response,
              application, null);
  %&gt;
  </code></pre>
  
  <p>I call the jsp with java servlet. is it must create the configuration in web.xml? How to fix this problem? Thanks.</p>