<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Sending Headers in OpenCMS 6.2.3 and WAS 6 [very tricky]</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I'd like to discuss a very technical question with some developpers out here.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have found the reason of a bug I have on WebSphere and fckeditor (you can't choose any image). The bug is here: </FONT><A HREF="http://bugzilla.opencms.org/show_bug.cgi?id=1650"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://bugzilla.opencms.org/show_bug.cgi?id=1650</FONT></U></A></P>

<P><FONT SIZE=2 FACE="Arial">Now, I _do_ know where is the problem, but my solutions so far not so clean.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I understood it was due to a wrong "content-type" header, thanks to this discussion: </FONT><A HREF="http://fckeditor.biz/viewtopic.php?t=1185"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://fckeditor.biz/viewtopic.php?t=1185</FONT></U></A><FONT SIZE=2 FACE="Arial">. So, the _fckeditor_ error is in fact due to _WebSphere_ that would return "text/html" instead of "text/xml" for Tomcat, when the user clicks "browser server". This is what happens when requesting file system/workplace/editors/fckeditor/filebrowser/connector.jsp.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">So, in a word, the content-type returned for the same jsp file is different between Tomcat and WebSphere. Then I found this very interesting, old thread in our mailing list: </FONT><A HREF="http://mail.opencms.org/pipermail/opencms-dev/2007q1/027910.html"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://mail.opencms.org/pipermail/opencms-dev/2007q1/027910.html</FONT></U></A><FONT SIZE=2 FACE="Arial"> (I took the same subject for my message).</FONT></P>
<BR>

<P><FONT SIZE=2 FACE="Arial">I actually have the answer to "why is my content-type NOT set with WebSphere?".</FONT>

<BR><FONT SIZE=2 FACE="Arial">There are two reasons to that:</FONT>

<BR><FONT SIZE=2 FACE="Arial">- for some reason, it seems you can't set the Content in a jsp context in WebSphere except with contentType="" attribute: that looks amazing to me but I am sure of that after a bunch of tests.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">- if no contentType="" attribute is set in the jsp page, then a default one is: "text/html".</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">That's a big pb with file connector.jsp, as the content type would be different depending on the action.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">The only solution I found so far is:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">- jsp file: force contentType="special_value"</FONT>

<BR><FONT SIZE=2 FACE="Arial">- in FlexResponse (the OpenCms HTTPResponse wrapper) => do not set contentType if == "special_value"</FONT>

<BR><FONT SIZE=2 FACE="Arial">- after the page has been loaded with CmsJspLoader => re-set the value that was supposed to be set ("text/html" or "text/xml")...</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I want to provide my fix to the comunity, but if someone could help find a more elegant solution, I'm welcome for discussion, tests, etc.</FONT></P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Thanks!</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Olivier</FONT>
</P>
<BR>

<P><B><FONT COLOR="#400040" SIZE=1 FACE="Verdana">Olivier CHIROUZE<BR>
</FONT></B><I><FONT COLOR="#000000" SIZE=1 FACE="Verdana">I&0 Infrastructure<BR>
</FONT></I><FONT COLOR="#000000" SIZE=1 FACE="Verdana"> <BR>
</FONT><U></U><U><B><FONT COLOR="#0000A0" SIZE=1 FACE="Verdana">Volvo Information Technology                                                                                            </FONT></B></U><B></B><FONT COLOR="#000000" FACE="Times New Roman"></FONT> </P>

<P><FONT COLOR="#000080" SIZE=1 FACE="Arial">402 avenue Charles de Gaulle   </FONT><SPAN LANG="sv"> <FONT COLOR="#000000" SIZE=1 FACE="Wingdings">(<FONT FACE="Courier New"></FONT></FONT></SPAN><SPAN LANG="fr"> <FONT COLOR="#000080" SIZE=1 FACE="Arial">phone: +33 (0)4.72.96.89.39      <BR>
API: VNX 0A0 0 02                      </FONT></SPAN><SPAN LANG="sv"> <FONT COLOR="#000000" SIZE=1 FACE="Wingdings 2">6<FONT FACE="Courier New"></FONT></FONT></SPAN><SPAN LANG="fr"> <FONT COLOR="#000080" SIZE=1 FACE="Arial">telecopy: +33(0)4.72.96.76.80<BR>
69635 Vénissieux Cedex - France</FONT></SPAN><SPAN LANG="sv"> <FONT COLOR="#000000" SIZE=1 FACE="Wingdings">*</FONT><FONT COLOR="#000000" SIZE=1 FACE="Wingdings 2"><FONT FACE="Courier New"></FONT></FONT></SPAN><SPAN LANG="fr"> </SPAN><A HREF="mailto:olivier.chirouze@external.renault-trucks.com"><SPAN LANG="fr"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Arial">olivier.chirouze@volvo.com</FONT></U></SPAN><SPAN LANG="fr"></SPAN></A><SPAN LANG="fr"></SPAN><SPAN LANG="sv"></SPAN><SPAN LANG="fr"></SPAN>
</P>
<BR>

</BODY>
</HTML>