[Zope] set the MIME Type

Thomas B. Passin tpassin@mitretek.org
Tue, 4 Jun 2002 15:35:30 -0400

I think you should be using

 setHeader("Content-Type", "application/x-java-jnlp-file")

Otherwise the blank line ending the headers would be inserted (by Zope's
machinery) before the line you put into your file, causing it to be ignored.

[Christian Peer]

Additional to Message 91060:

Yes, I have inserted a blank line.
Here is the source code of the DTML Method (SimpleExample.jnlp):

Content-Type: application/x-java-jnlp-file

<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SimpleExample Application -->

       <title>Swing Application - Hello World</title>
       <description>Swing Application - Hello World</description>
       <description kind="short">Swing Application - Hello
       <j2se version="1.3"/>
       <jar href="SimpleExample.jar"/>
     <application-desc main-class="SimpleExample"/>

The SimpleExample.html links to SimpleExample.jnlp and the third file in the
folder is SimpleExample.jar.

What happens:
Java Web Start is loaded correctly and than I get a download error when it
tries to
access the recource "http://localhost/SimpleExample.jnlp", the server
returns wrong MIME type text/html.

Could you help me?