[opencms-dev] CmsJspBean.setContentType() not working in OpenCMS7.5.1

Olaitan Olamilehin olaitan.olamilehin at moremr.com
Thu Dec 10 13:15:44 CET 2009


Hi Roman,

Thanks for your response. CmsJspBean.setContentType() does the same
thing(i.e using CmsFlexController.getTopResponse().setContentType(type))

I tried your suggestion and it still does not work. The default content
type "text/html;charset=UTF-8" is used instead.

Any additional suggestions are highly welcome.

-Olaitan
On Thu, 2009-12-10 at 12:58 +0100, Roman Uhlig Maxity.de wrote:
> AFAIK it has always been like this:
> 
> CmsFlexController controller = CmsFlexController.getController(request);
> response = controller.getTopResponse();
> response.setContentType("text/comma-separated-values");
> // optional download popup
> response.setHeader("Content-Disposition", "filename=file.csv");
> 
> Roman
> 
> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Olaitan Olamilehin
> Gesendet: Donnerstag, 10. Dezember 2009 12:46
> An: The OpenCms mailing list; m.jaeger at alkacon.com
> Betreff: [opencms-dev] CmsJspBean.setContentType() not working in OpenCMS7.5.1
> 
> Hi everyone,
> 
> It seems to me that the CmsJspBean.setContentType() is no longer working
> in 7.5.1. In past releases of OpenCMS this worked just fine. Basically,
> I have a jsp servlet that writes out an image and I need to set the
> content type of the image to the response and since using
> HttpServletResponse.setContentType() directly does not work because of
> the way OpenCMS handles and loads .jsp files am using
> CmsJspBean.setContentType() but this is not working in 7.5.1.
> 
> Thanks in advance for your suggestions.
> 
> -Olaitan.
> 
> 
> 
> 
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list