如何将Spring框架与水晶报表集成

发布于 2024-10-14 01:05:42 字数 1977 浏览 0 评论 0原文

这是我的问题我有Spring框架,我想集成Crystal Report,

问题是当Report调用Servlet CrystalReportViewerServlet时,Spring Dispacher找不到它,所以我如何让Spring Dispacher调用在我的声明上声明的默认Servlet web.xml

这里是我的web.xml

   <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>


  <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>/gaa.vargas.furniture/crystalreportviewers</param-value>
  </context-param>
  <context-param>
    <param-name>crystal_image_use_relative</param-name>
    <param-value>webapp</param-value>
  </context-param>

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
                /WEB-INF/applicationContext.xml
        </param-value>
  </context-param>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>*.htm</url-pattern>
  </servlet-mapping>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <welcome-file-list>
    <welcome-file>redirect.jsp</welcome-file>
  </welcome-file-list>

here is my problem I have spring framework and I want to integrate Crystal report

the problem is when Report call the servlet CrystalReportViewerServlet, the spring dispacher don't find it so how I can make spring dispacher to call a default servlet that is declare on my Web.xml

here is my web.xml

   <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>


  <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>/gaa.vargas.furniture/crystalreportviewers</param-value>
  </context-param>
  <context-param>
    <param-name>crystal_image_use_relative</param-name>
    <param-value>webapp</param-value>
  </context-param>

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
                /WEB-INF/applicationContext.xml
        </param-value>
  </context-param>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>*.htm</url-pattern>
  </servlet-mapping>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <welcome-file-list>
    <welcome-file>redirect.jsp</welcome-file>
  </welcome-file-list>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文