I have two recommendations for you, below.
Rob Mitchell wrote:
> Hi,
>
> I've set up the apache-tomcat configuration with the aim of having jsp
> pages deliver WML to the WAP browser in the Nokia WAP toolkit.
>
> I have set up a JSP page under Tomcat that just contains WML content.
>
> So far the WAP Toolkit can access the page but as far as I can tell it is
> being encoded in MIME as HTML. At least, the cache for the Nokia Toolkit
> shows an HTML page being cached, though it contains the WML. Also the Nokia
> Browser displays some of the page but it looks like its not displaying
> parts of the page which have '<' or '>' next to them but I'm getting just
> about everything else, including the WML version. I have checked that the
> page is correctly formed by loading it separately as a WML file.
>
> So at the moment my thinking is that Tomcat is handling the JSP but is
> returning the output from the page as HTML, even though the contents are WML.
>
> I have noticed that in my tomcat-apache.conf file that the line that should
> read:
>
> AddType text/jsp .jsp
>
> reads
>
> AddType test/jsp .jsp
>
> I dont know if that is screwing anything up or not.
>
> Can anyone who has done this give me a clue ?
>
> Thanks
> Rob
First, go directly to the Jakarta web site <http://jakarta.apache.org> and
download Tomcat 3.2. <Monopoly:metaphor>Do not pass GO. Do not collect
$200</Monopoly:metaphor>. Tomcat 3.2 fixes over a hundred bugs in Tomcat 3.1.
Second, the content type that is created by a JSP page is controlled by what your
page declares in the "page" directive, not by Tomcat. If you wish to have the
output treated as XML, for example, you would include a directive like this at
the top of your pages:
<%@ page contentType="text/xml" %>
You will need to review the documentation of the WAP Toolkit you are using to
determine what content type it is expecting, but the choice of content type is up
to the page author, not the servlet container.
Craig McClanahan