<action name="trial_employee"
class="parity.action.Tri开发者_StackOverflow社区alPrintEmployeeCopyAction">
<result>/protected/trial_employee.pdf</result>
</action>
I've got an action class that generates a PDF file for download. How do I configure the action result to return the PDF?
The above doesn't work, it gives me a 404 error because the pdf isn't physically on the drive, it's being generated dynamically.
If it is being generated dynamically you can return it as a stream something like
<result name="pdf File" type="stream">
<param name="contentType">${contentType}</param>
</result>
more details are here
Stream result
精彩评论