Quantcast
Viewing all articles
Browse latest Browse all 893

Viewer is unable to connect with the CrystalReportViewerServlet

I know this question has been asked before but I have followed all of the instructions and still cannot get my application configured correctly. I basically followed the steps outlined in "Viewers Java SDK Developers Guide" to copy all of the required jar files, include the crystalreportviewers12 folder in the document root of my web application, and map the CrystalReportViewerServlet.

 

Here is my entry for the static files:

 

<context-param>

        <param-name>crystal_image_uri</param-name>

        <param-value>/crystalreportviewers12</param-value>

</context-param>

 

Here is my entry for the servlet and servlet mapping:

 

<servlet>

        <servlet-name>CrystalReportViewerServlet</servlet-name>

        <servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>

</servlet>

<servlet-mapping>

        <servlet-name>CrystalReportViewerServlet</servlet-name>

        <url-pattern>/CrystalReportViewerHandler</url-pattern>

</servlet-mapping>

 

I have verified that CrystalReportViewerServlet, located in webreporting.jar, is in my server classpath.

 

When I run the report the first page of the report is rendered in the viewer. I see the report data and all of the toolbar buttons rendered correctly. Two things are wrong however. Any images in the report are not displayed correctly. When I inspect the properties of an image I see that the Web application context is missing from the url. So for example, the path to the image is 'http://localhost:8080/CrystalReportViewerHandler?dynamicimage=..." when I think it should be "http://localhost:8080/myWebApp/CrystalReportViewerHandler?dynamicimage=..."

 

The second problem occurs when I click a navigation button. An error dialog pops up indicating that the viewer is unable to connect with the CrystalReportViewerServlet. When I run the application in Firefox I can see the request that is sent when I click a navigation button. The request is "http://localhost:8080/CrystalReportViewerHandler".  Again, I think the web application context is missing from the request uri.

 

So obviously, this is a configuration issue, but I don't know how to fix it. I tried all three options for the "crystal_image_use_relative" context parameter. Either "page" or leaving it out entirely are the only two options that work. If I specify "webapp" or "server" then the viewer cannot find the necessary resource files.

 

Currently I am running the Web application on a local Glassfish 3.1 server. I have used and developed against the Crystal Enterprise 11 SDK for years so I am not exactly inexperienced with this. But for some reason I am stumped now. I hope I have provided enough information for someone to point me in the right direction. Thanks in advance for your help.


Viewing all articles
Browse latest Browse all 893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>