In plain
Struts it is easy:
response.setContentType("application/pdf");
response.setHeader("Content-disposition","attachment;filename=x.pdf");
java.io.PrintWriter out = arg3.getWriter();
out.print("<output>");
out.print("test raise file dialog example output");
out.print("</output>");
But I don't know how to access the HttpServletResponse object. I tried to cast the PortletResponse object in the execute method, which compiles and runs, but I get exceptions afterwards.
Is there any way to do this in during the render phase of the portlet?
I probably can execute the above code in the
JSP, but doing it in the JSP is ugly.
I appreaciate your help,
Alejandro Barrero