[opencms-dev] Setting Content-Type response header from a JSP page?

Joachim Zittmayr joachim at imap.cc
Thu Mar 2 11:46:42 CET 2006


hi!

what u also could do, is to write an implementation of the
javax.servlet.Filter Interface, which allows you to do nice things with
the request and response (as for instance request.setContentType()
etc...) objects!

just an idea!

On Wed, 1 Mar 2006 11:15:25 -0500, "Ben Hurwitz" <bhurwitz at m-Qube.com>
said:
> Hello, I am a new programmer of OpenCms and I am trying to use it to
> serve content to multiple types of mobile devices (using wurfl and the
> wall tag library) from JSP pages.  I'm encountering a problem because it
> appears that OpenCms is constantly setting the Content-Type header on
> the response to text/html, overriding my attempts to set it otherwise.
> My attempts include calling the setContentType() method on the
> HttpServletResponse object, calling the setHeader() method on that same
> response object, and setting the contentType attribute on the @page
> directive.
> 
>  
> 
> What is the solution or workaround so that I can set the response
> content-type, e.g., to application/vnd.wap.xhtml+xml or
> text/vnd.wap.wml?
> 
>  
> 
> Note: I searched the mailing list archives on this topic and did not see
> any responses to this question that would work in OpenCms 6.0.4.
> 
>  
> 
> Thanks for any help.
> 
>  
> 
> Ben Hurwitz
> 
-- 
  Joachim Zittmayr
  joachim at imap.cc

-- 
http://www.fastmail.fm - Accessible with your email software
                          or over the web




More information about the opencms-dev mailing list