I think my question has been misunderstood. I am not trying to generate XML from
the JSP.

I am trying to use the alternative XML -syntax- that chapter 7 of the JSP 1.1
spec proposes.

For example:

<%@ page ... > could be written as  <jsp:directive.page ../>

<%@ include ... %>  could be written as <jsp:directive.include ../>

Tomcat does not seem to "recognize" the -jsp xml syntax- and as - jsp standard
syntax- .

Thanks,
Stan






Nathan Revo wrote:

> I've been experimenting with XML from JSP's on an IBM WebSphere web server.
> I have been able to produce XML documents in a small way.  These links are
> the best I've found.  They are references for JSP syntax and give GREAT
> clues to programming with JSP.
>
> jsp 1.1
> http://java.sun.com/products/jsp/pdf/card11.pdf
>
> jsp 1.0
> http://java.sun.com/products/jsp/syntax.pdf
>
> jsp 0.9?
> http://as400.rochester.ibm.com/products/websphere/docs/as400v202/wasfrm4.htm
> l
>
> I'm not an XML expert but I don't think the <html> or <body> tags should be
> used in an XML document...
>
> Also place one of these lines of code at the top of your JSP page to set the
> content type to XML.
>
> <% content_type="text/xml" %>
> or
> <%@ contentType="text/xml" %>
> or
> <%@ page contentType="text/xml" %>
>
> Attached is a small XML example, compliments of Lycos.  I don't know the
> standards for XML, but I think there needs to be a <!DOCTYPE ...[ ... ]> tag
> at the top of the file defining the XML tags.  I would post the url to my
> test JSP page, but the JSP/servlet server is internal only.  We are trying
> to determine if it is right for our business.
>
> Good luck.
>
> Nathan
> -----Original Message-----
> From: Stanley Santiago [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 27, 2000 2:56 PM
> To: [EMAIL PROTECTED]
> Subject: XML syntax in JSP
>
> Hi,
>
> I am trying to use XML syntax  in my JSP, running under Tomcat 3.1.
>
> Tomcat doesn't seem to understand and parse the XML tags and just
> writes to it to the browser.
> Has anyone tried this before ?
>
> Example:
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
>
> <! DOCTYPE root
> PUBLIC "-//Sun Microsystems Inc.//DTD JavaServer Pages Version 1.1//EN"
>        "http://java.sun.com/products/jsp/dtd/jspcore_1_0.dtd">
>
> <jsp:root
>   xmlns:jsp="http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd">
>
> <html>
> <jsp:directive.page session="false"/>
> <body bgcolor="white">
> <font size=4>
> <ul>
> <li>HELLO WORLD !
> </li>
> </ul>
> </font>
> </body>
> </html>
>
> </jsp:root>
>
> Thanks,
> Stan
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>   ------------------------------------------------------------------------
>                             Name: ShortFormatSample.xml
>    ShortFormatSample.xml    Type: unspecified type (application/octet-stream)
>                         Encoding: quoted-printable

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to