【发布时间】:2013-06-02 15:30:42
【问题描述】:
我为 Liferay 6 开发了一个自定义 portlet。
单击链接应打开弹出窗口以打开/保存使用 Jasper 报告生成的 pdf 文件。
我使用response.setContentType ("application/pdf"),其中响应为RenderResponse。
但它返回以下错误:
ERROR java.lang.IllegalArgumentException: application / pdf is not a supported mime type 在 com.liferay.portlet.MimeResponseImpl.setContentType (MimeResponseImpl.java: 159)........
我也尝试在文件portlet.xml中添加标签
<supports>
<mime-type> application/pdf </mime-type>
<portlet-mode> view </portlet-mode>
</supports>
但我总是遇到同样的错误。
你有什么建议吗?
【问题讨论】:
标签: java jasper-reports liferay liferay-6