struts2 - ERROR: application/pdf is not a supported mime type -
this question exact duplicate of:
- file not downloading server 3 answers
i using struts2 , liferay developing application.
my struts.xml follows:
<action name="download" class="com.stp.portal.view.downloadaction"> <result name="success" type="stream"> <param name="contenttype">application/pdf</param> <param name="inputname">fileinputstream</param> <param name="contentdisposition">attachment;filename="abc.pdf"</param> <param name="buffersize">1024</param> </result> </action> i want download pdf file server. following error:
10:05:55,782 error [jsr168dispatcher:38] not execute action java.lang.illegalargumentexception: application/pdf not supported mime type @ com.liferay.portlet.mimeresponseimpl.setcontenttype(mimeresponseimpl.java:159)...
don't know how resolve this. appreciate someone's help. need done.
looking @ source code seems application/vnd.wap.xhtml+xml , text/html allowed.
source: http://grepcode.com/file/repo1.maven.org/maven2/com.liferay.portal/portal-impl/6.0.2/com/liferay/portlet/mimeresponseimpl.java
Comments
Post a Comment