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: guy (guy@polylab.sfu.ca)
Date: 01/12/2000 - 20:48
Thanks Eric,
I did try that. Any other suggestions? I think it might be a Tomcat(3.1beta)
bug. Both my servlet and XT seem to be setting content type.Here is what the
author of XSLT: Programmer's Reference had to say:
Subject: RE: Content-Type
From: Kay Michael <Michael.Kay@icl.com>
Date: Thu, 30 Nov 2000 16:20:03 -0000
X-Message-Number: 8
It's up to the servlet code to set the media type in the HTTP header. Are
you using the sample servlet that comes with xt? I haven't looked at it
myself; but that's the place to look. All that the media-type attribute on
xsl:output can do is to make the media type available to the calling code,
it isn't going to set it in the HTTP header itself.
Mike Kay
> I am using XSLT to generate WML. My servlet uses the Clark XP
> and XT. When
> I set the content type in my servlet the output contains both:
> Content-Type: text/vnd.wap.wml
> Content-Type: application.xml
>
Eric van der Vlist wrote:
> 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://mbaprojectsearch.com
> http://smallbusinessmerchantaccounts.com - http://attorneycreditcardprocessing.com http://superdavesgunshow.com
> ------------------------------------------------------------------------
>
> --
> Mailing list for the XT users community. (http://merchantaccountagentprogram.com)
> (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
--
Mailing list for the XT users community. (http://millstreamctc.org)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
Archive générée par hypermail 2b28 le 25/04/2001 - 07:16 CEST
webmaster@4xt.org
|