tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danno Ferrin <shem...@earthlink.net>
Subject Re: WML Generation from JSP broken!!!!
Date Thu, 30 Nov 2000 15:50:33 GMT
I am sorry to start this thread here, but I believe that jasper-4.0's 
behavior is in error.  The behavior I think the spec calls for in 
determining if a page is a JSP Document (xml jsp) or an XMl document 
with JSP markup is the presence or absence of a jsp:root element.

This is further supported by the content of one of the spec examples  
(pg. 36 from the JSP 1.2 PD1 draft), specifically it encourages the use 
of the <?xml version="1.0?> header in a document with jsp pages and not 
jsp documents

p125 sec. 7.2.1 also would imply that it is the presence of the jsp:root 
element at the root of the document that makes an xml document into a 
jsp document.

I am also forwarding this to the jsr-053 expert group, that's where the 
clarification should come.  I am ok with it being either way, but I 
think the current spec is a little vague and leans towards the 
presence/absence of a jsp:root element (and then for the jsp:root QName 
only with no concern as to the namespace url.).

--Danno

Craig R. McClanahan wrote:

> 
> Davanum Srinivas wrote:
> 
>> Hi all,
>> Attached is a JSP Sample file which generates WML. It works with no problems on Tomcat3.1,
but
>> fails miserably with the latest dev nightly snapshot and m4. Can someone shed light?
>> 
> 
> Well, your page certainly doesn't work under Tomcat 4.0 (which implements JSP 1.2). 
Furthermore, it
> *should* not.
> 
> Because you are starting this page with an <?xml version="1.0"?> directive, the
JSP compiler assumes that
> you have created this page in the XML syntax for JSP pages, as described in the 1.2 spec
> <http://java.sun.com/products/jsp/download.html>.  However, this page violates
several of the rules:
> * It does not start with a <jsp:root> element (this is
>   what the parse error is complaining about).
> * It uses <% %> for a scriptlet, instead of the
>   required <jsp:scriptlet> element.
> 
> You will need to rewrite your page conforming to the new syntax rules in order for it
to work correctly
> under 4.0.
> 
>> Thanks in advance,
>> dims
>> 
>> PS: Am not currently subscribed to the list. So please CC me at "dims@yahoo.com"
>> 
> 
> Craig McClanahan
> 
> PS:  Why did it work under 3.1?  Because 3.1 didn't support the XML syntax, so it just
passed the <?xml?>
> directive through as template text.
> 
> 
> 
> 
> 
> 


Mime
View raw message