[opencms-dev] flex/jsp setContentType problems
Geoff Winkless
opencms at geoff.dj
Mon Apr 5 12:42:01 CEST 2004
Hi
Using OpenCMS 5.0.1 (the release version)
We were having some issues (translation: it doesn't work ;-]) with
response.setContentType() and (reading the source) I find that the
actual work of the function is commented out:
public void setContentType(String type) {
if (DEBUG) System.err.println("FlexResponse: setContentType("
+type + ") called");
// TODO: Check setContentType() implementation
// If this is not the "Top-Level" element ignore all settings of
content type
// If this is not done an included JSP could reset the type with
some unwanted defaults
if (! m_isTopElement) return;
/*
if (type != null) {
// ensure that the encoding set by OpenCms is not
overwritten by the default form the JSP
type = type.toLowerCase();
int i = type.indexOf("charset");
if (type.startsWith("text") && (i > 0)) {
StringBuffer buf = new StringBuffer();
buf.append(type.substring(0, i));
buf.append("charset=");
buf.append(m_encoding);
type = new String(buf);
if (DEBUG) System.err.println("FlexResponse:
setContentType() changed type to " +type);
}
}
m_res.setContentType(type);
*/
}
Is this code commented out because it's known not to work or because
it's not known to work?
I've got around it for now by using setHeader("Content-type", str),
should anyone be searching the archives for the same problem.
Thanks
Geoff
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
More information about the opencms-dev
mailing list