I am building a small bulletin-board system which should support attachments as well. For that, I would need to serve binary content from a PortletAction or Portlet class. Is this possible with J1?
The procedure I should do is: 1) Set "content-disposition" header to contain the correct filename 2) Set "content-type" header to "application/octet-stream" or something more accurate if the information is present in attachment metadata 3) Dump the content using a ServletOutputStream I tried to do this within a PortletAction class, but Jetspeed has already obtained a Writer prior to calling the PortletAction and therefore I cannot obtain ServletOutputStream from HttpServletResponse. As you know, Writer shouldn't be used for binary data because it may perform some character encoding on the content, and it might break the attachments. Do I need to create a separate servlet for serving the attachments? I wouldn't want to do that, because Jetspeed offers authorization and I would really like to fully utilize it. Regards, Sami -- Sami Leino Software Developer Netorek Oy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
