tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Delisle <pierre.deli...@sun.com>
Subject Re: More on JSP in XML format
Date Fri, 24 Nov 2000 14:22:52 GMT
If you want to have a JSP page in XML syntax, you must comply 
with what is described in section 5 of the JSP Public Final Draft
[http://java.sun.com/aboutJava/communityprocess/first/jsr053/index.html]

More specifically:

"A JSP document has jsp:root as its root element type. The root is the place where taglibs
will insert their namespace attributes. The top element has an xmlns attribute that enables
the use of the standard elements defined in the JSP 1.2 specification.
All tag libraries used within the JSP document are represented in the root element through
additional xmlns attributes. There should be no other attributes in this element.
<jsp:root
    xmlns:jsp=”http://java.sun.com/jsp_1_2”
    xmlns:prefix1=”URI-for-taglib1”
    xmlns:prefix2=”URI-for-taglib2”... >
JSP page
</jsp:root>

    -- Pierre

Partha Bhattacharjee wrote:
> 
> Hello,
> 
> I am sorry, I do not have an answer to the problem but I have another
> problem of the same genre.
> 
> I am writing a simple xml and parsing that client side with a simple xsl. It
> is working fine.
> 
> However the problem start when I write the same xml in a jsp file. Sometimes
> the jsp will realise that the stuff it contains is a xml sometimes it won't.
> 
> I have been working on it for quite some time ( read wasted one day ) and it
> appears to have to do something with the tomcat. Can you all tomcat users
> write the following jsp and check out.
> 
> partha1.jsp
> ==========
> <?xml version="1.0"?>
> <doc>
>  <name> partha </name>
> </doc>
> 
> partha2.xml
> ==========
> <?xml version="1.0"?>
> <doc>
>  <name> partha </name>
> </doc>
> 
> Check out if the two files are always giving the same display on the
> browser.
> 
> Please let me know.
> 
> thanks in anticipation
> 
> brgds
> partha
> 
> -----Original Message-----
> From: Anne and Bill Moore [mailto:nzmoore@bellsouth.net]
> Sent: Thursday, November 23, 2000 10:05 AM
> To: tomcat user
> Subject: More on JSP in XML format
> 
> I anm still trying to get my head around JSP in XML format.
> Can anyone suggest further reading beyond the JSP Version 1.2 - Proposed
> Final Draft (PFD) spec or provide examples.
> When I try the examples like those from the spec using Tomcat Version
> 4.0 Milestone 4, I routinely get a java.lang.ClassCastException:
> org.apache.jasper.compiler.ParserXJspSaxHandler$Node.
> After some experimentation I was able to get very simple XML formatted
> JSP to work, but it seems that whenever the jsp contained a jsp:cdata
> element the class cast exception occurs.
> It may be that I have misunderstood the jsp:cdata element or is this a
> bug in Tomcat?
> --
> Thanks and Regards
> Anne and Bill Moore
> nzmoore@bellsouth.net
> Remember: Life is too short to drink bad wine!!!

Mime
View raw message