You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Josh Holding <jh...@voyagerlearning.com> on 2004/02/10 21:42:26 UTC

Setting mime type or content type in portlet

I'm in the process of moving some jsp's over into Jetspeed 1.4b4 portlets.
I've run into an issue where the jsp does the following:

response.setContentType( "application/vnd.ms-excel" );

This opens the generated html into Excel instead of the browser as expected
in a non-jetspeed environment, but not in Jetspeed.

I've tried doing something like this in the jsp:

rundata.setContentType( "application/vnd.ms-excel" );

but this does not work either.  I've also tried creating a new media-type in
media.xreg:

  <media-type-entry name="excel">
    <mime-type>application/vnd.ms-excel</mime-type>
    <meta-info>
      <title>Excel</title>
      <description>Excel mime type</description>
    </meta-info>
  </media-type-entry>

Then reference that in the portlet definition like so:

<media-type ref="excel"/>

This doesn't work either.  I wasn't sure what else to try and wanted to see
if anyone had any advice.  

Thanks-
Josh