AW: [opencms-dev] flex/jsp setContentType problems

Oppermann, Joerg Joerg.Oppermann at t-systems.com
Mon Apr 5 14:48:04 CEST 2004


Hi Geoff,

scan the list for setContentType - there is a statement from Alex at 2004/01/22 to the topic.

bye, Joerg

-----Ursprüngliche Nachricht-----
Von: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org]Im Auftrag von Geoff Winkless
Gesendet: Montag, 5. April 2004 12:41
An: opencms-dev at opencms.org
Betreff: [opencms-dev] flex/jsp setContentType problems


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 
______________________________________________________________________
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list