[opencms-dev] WebSphere 7 content type problem

Olivier Chirouze olivier.chirouze+opencms at gmail.com
Wed Apr 27 11:48:25 CEST 2011

Sorry, this is, in fact, in file CmsFCKEditorFileBrowser.java, not in


On Wed, Apr 27, 2011 at 11:13 AM, Olivier Chirouze
<olivier.chirouze+opencms at gmail.com> wrote:
> Hi,
> Based on a weird problem with FCKEditor, we managed to tail down to a
> bug with WebSphere 7 and OpenCms 7.5.x
> At some point FCKEditor is expecting a text/xml response while it is
> getting a text/html one. Thus, the xml tree cannot be used by
> FCKEditor's XMLHTTPRequest.
> It turns out connector.jsp is returning the wrong HTTP response. We
> checked the Apache front-end server and it is fine. The problem is
> with the code running in WebSphere 7 (in 6.x or Tomcat, off course
> there is no pb).
> I looked further in the code and found this part in method
> initWorkplaceRequestValues():
>        // Note that this won't work on WebSphere in the JSP scope
>        // => thus, the HTTPServletResponse contentType will stay to null.
>        // See next line on how this is solved on WebSphere
>        res.setContentType(contentType);
>        // Also set it at "normal" level for WebSphere issues
>        // (so the content type can be "cached" and "flushed" outside of
>        // the jsp scope...)
>        getJsp().getResponse().setContentType(contentType);
> As it talks about a specific problem with WebSphere, I am suspecting
> that something changed between WAS 6 and 7 and that today, this piece
> of code is not working anymore.
> Let me repeat what the issue is: in that specific case (on a
> ACTION_GETFOLDERS call), the content type send with the response
> SHOULD BE text/xml, it ends up beeing text/html. So, this
> setContentType seems not to work in WAS 7.
> I will try alternate fixes but if some OpenCms developer could help
> us... that'd be great.
> Thanks!
> Olivier

More information about the opencms-dev mailing list