list4xt : Mailing list for the XT users community.
[list4xt] Eric Re: response.setContentType("text,vnd.wap.xml")
Subject: [list4xt] Eric Re: response.setContentType("text,vnd.wap.xml")
From: guy (guy@polylab.sfu.ca)
Date: 02/12/2000 - 02:37
Brilliant.That looks like the solution I have been hunting high and low for.
My Java is not very good yet. Will your XHTMLOutputHandler output XML (WML) and
how do I get my XSLServlet to use it?
In the long run I want to be able to handle different media-types. What solution
would you recommend?(the more explicit the better):)
I can't thank you enough.
Guy
Eric van der Vlist wrote:
> Oooops, sorry, my mistake !
>
> There is a mechanism that passes the HttpServletResponse to the output
> handler:
>
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
> throws ServletException, IOException {
>
> .../...
> outputMethodHandler.setDestination(new ServletDestination(response));
>
> but the media type is NOT used in the XMLOutputHandler:
>
> public DocumentHandler init(Destination dest, AttributeList atts)
> throws IOException {
> this.out = dest.getOutputStream("application/xml", null);
>
> If my implementation is working, it's because I am not using the
> XMLOutputHandler but my XHTMLOutputHandler [1] that does use the
> mediaType:
>
> public DocumentHandler init(Destination dest, AttributeList atts)
> throws IOException {
> String mediaType = atts.getValue("media-type");
> if (mediaType == null)
> mediaType = "text/html";
>
> I had omitted to say this since my motivation for using this output
> handler was to send iso-8859-1 documents (which XMLOutputHandler doesn't
> support) and I had assumed the 2 methods had the same way to handle the
> media types !
>
> As a short term solution, you can either use the XHTMLOutputHandler or
> modify the XML OutputHandler as shown above.
>
> Sorry for the confusion.
>
> Eric
>
> [1]
> /downloads/examples/outputhandlers/xhtml/XhtmlOutputHandler.java
>
> --
> See you at XML 2000
> http://gca.org/attend/2000_conferences/XML_2000/building.htm#vlist
> ------------------------------------------------------------------------
> Eric van der Vlist Dyomedea http://highriskmerchantaccount.co
> http://highriskmerchantaccountprovider.com - http://insidebutlercounty.com http://thecopenhagennyc.com
> ------------------------------------------------------------------------
>
> --
> Mailing list for the XT users community. (http://upopassaic.org)
> (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
--
Mailing list for the XT users community. (http://pinnaclebanksc.com)
(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
|