[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Re: response.setContentType("text,vnd.wap.xml")

Subject: [list4xt] Re: response.setContentType("text,vnd.wap.xml")
From: Eric van der Vlist (vdv@dyomedea.com)
Date: 01/12/2000 - 08:02


Hi,

guy wrote:
>
> I am running a servlet that uses XT and an XSLT stylesheet to convert
> data to WML. When I try to affect the output header with
> response.setContentType("text,vnd.wap.xml"), my output contains:
> HTTP/1.0 200 OK
> Content-Type: text/vnd.wap.wml
> Content-Type: application/xml
>
> which doesn't work.
> Is the XT servlet outputing its default content after my servlet outputs
> what I want?

Yes, exactly.

> How do I get the desired results? ie. only:
>
> HTTP/1.0 200 OK
> Content-Type: text/vnd.wap.wml

You should use the "media-type" attribute of the xsl:output element to
set the content type instead of the Java method, for instance:

<xsl:output method="xml"
        doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
        doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"
        encoding="iso-8859-1"
        media-type = "text/vnd.wap.wml"
        />

Eric

> Thanks
> Guy
>

-- 
See you at XML 2000
      http://gca.org/attend/2000_conferences/XML_2000/building.htm#vlist
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://pfcigars.com
http://americasbestmerchantservices.com -           http://colonialvabank.com              http://unwasteny.org
------------------------------------------------------------------------

-- Mailing list for the XT users community. (http://reddirtfilmfestival.org) (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org


A site designed by Dyomedea