It seems to me there are a couple solutions:

1) look for jsp:root
2) use DOCTYPE
3) based it on file extension

I don't like 1 because it adds overhead to the translation process,
and you have to deal with cases like: <%-- jsp:root --%>

I don't like 2 because if your JSP page is generating XML and you want
to output a DOCTYPE then you have a collision.

So that leaves 3 which I like the best.  A good standard default would
be "jspx".  Of course most app servers allow this to be customized.  I
also like this because then different filters can be assigned to JSP
pages written in XML and plain old JSP pages.

Hans Bergsten <[EMAIL PROTECTED]> writes:

> Danno Ferrin wrote:
> > 
> > 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.
> > [...]
> 
> I agree. JSP 1.1 says that everything that's not a JSP element is
> treated as template text, and that any type of markup (text) language
> can be used as template text. This means that a pure XML document,
> with an <?xml version="1.0?> element at the top, is a valid JSP
> page using the JSP 1.1 syntax.
> 
> The best (only?) way to identify a page that uses the JSP 1.2 XML syntax
> is what you suggest: look for a jsp:root element. This should be
> clarified in the JSP 1.2 spec.
> 
> Hans
> -- 
> Hans Bergsten         [EMAIL PROTECTED]
> Gefion Software               http://www.gefionsoftware.com


-- 
Tom Reilly
Allaire Corp.
http://www.allaire.com

Reply via email to