radekben27 Posted November 6, 2013 Share Posted November 6, 2013 I'm calling report from JasperReport Server via URL. parameter output is set to pdf. Generated report is opened in the same tab (Content-Disposition=application - maybe it is default). I want to download pdf file instead of (Content-Disposition=attachment). Is it possible to set in URL Content-Disposition? Link to comment Share on other sites More sharing options...
gotoark Posted July 16, 2018 Share Posted July 16, 2018 Add headers property in your bean <bean id="myReportPDF" class="org.springframework.web.servlet.view.jasperreports.JasperReportsMultiFormatView" p:url="/WEB-INF/jrxml/tac/yourjrxml.jrxml" p:reportDataKey="datasource"> <property name="headers"> <props> <prop key="Content-Disposition"> attachment; filename=mypdf.pdf </prop> </props> </property> </bean> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now