Hi, Please help to resolve my error. I am using crystal report viewer on eclipse. I can able to see that data in report but when trying to use page navigation, search or any action which is present in toolbar getting below error. I am using struts2 with crystal report viewers jar in eclipse.
The viewer is unable to connect with the CrystalReportViewerServlet that handles asynchronous requests. Please ensure that the Servlet and Servlet-Mapping have been properly declared in the application's web.xml file.
Below I have mention my web.xml contents please have a look:
<?xml version="1.0" encoding="UTF-8"?> <!-- <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> --> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>CrystalReport</display-name> <context-param> <param-name>crystal_image_uri</param-name> <param-value>/crystalreportviewers</param-value> </context-param> <context-param> <param-name>crystal_image_use_relative</param-name> <param-value>webapp</param-value> </context-param> <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> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>redirect.jsp</welcome-file> </welcome-file-list> <error-page> <error-code>404</error-code> <location>/Pages/404.jsp</location> </error-page> </web-app>