【问题标题】:What's the best way to show html reports generated by JasperReport in a jsp?在 jsp 中显示 JasperReport 生成的 html 报告的最佳方式是什么?
【发布时间】:2012-01-04 14:33:02
【问题描述】:

我正在使用 JasperReports 和 Spring MVC 开发一个报告 Web 应用程序。

现在,我需要在网页中显示 Jasper 生成的报告。

是否有一些使用 Spring/JasperReport 的工具,或者我必须将 html 页面粗暴地包含到 jsp 中?

【问题讨论】:

    标签: java spring web-applications reporting jasper-reports


    【解决方案1】:

    是的,Spring MVC 支持将 jasper 报告作为视图

    【讨论】:

    • 谢谢!我试图按照这个文档进行测试。我的疑问是:使用ViewResolver 并指定JasperReportsHtmlView 我将报告直接显示在页面中还是必须下载?
    • 你可以同时做到这一点。如果要使其可下载,则需要添加标题Content-disposition: attachment
    • 非常感谢您的回答!
    猜你喜欢
    • 2017-12-08
    • 1970-01-01
    • 2010-09-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多