portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Marshall <jmarsh...@libertysite.com>
Subject Problems setting content type to application/vnd.ms-excel
Date Fri, 21 Jun 2002 18:37:46 GMT
I am trying to sent the content type in a portlet doExcelselect method 
using :
<<<
        MimeType mt = new MimeType("application/vnd.ms-excel");
//        rundata.setContentType( mt.getContentType() );
//        rundata.setCharSet( mt.getCharSet() );
        rundata.setContentType("application/vnd.ms-excel");
//        rundata.getResponse().setContentType("application/vnd.ms-excel");
       
        VelocityPortlet portlet = (VelocityPortlet)context.get("portlet");
        Log.debug("portlet supports type "+portlet.supportsType(mt));

//                implementation junk

        // just before return
        Log.debug("doExcelselect content type is 
"+rundata.getContentType());
       

The portlet.supportsType() returns true, and the last debug 
rundata.getContentType() returns application/vnd.ms-excel.

Does this logic work?

The idea is to build an html table, set the content type to 
application/vnd.ms-excel, and let the browser show the spreadsheet (I.E) 
or ask for an application (Netscape).

This works in other (non-Jetspeed) servlets, and I am wondering if 
anyone has had success with this, or something like it.

Thanks
Jeff


--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message