Hi all -

I've noticed a couple of problems with Jasper when processing
JSP documents, that is, JSP pages authored in the XML syntax.
I'm using the tomcat-b7 release.

The documents I've tried contain explicit <jsp:root> elements,
as it seems they ought to.  Unfortunately, the XmlOutputter class
in Jasper, while making an effort to avoid choking on multiple
<jsp:root> elements encountered while processing included
pages, does not handle the case where the outermost containing
page itself contains such an element.

One result is that two </jsp:root> end tags get emitted into the page.
The more subtle issue has to do with the xmlns:jsp and version
attributes on the <jsp:root> start tag.  Jasper inserts hardcoded values 
for those attributes corresponding to the JSP 1.2 release. But in order
to be truly valid, the document itself should contain those attributes
(at least version is required). So two instances of each attribute end up
in the output, causing the resulting XML stream to be invalid when parsed
by, for example, the tag library validator in JSPTL.

Maybe the attributes in the outermost containing page ought to
override any hardcoded defaults Jasper wants to assert? Or maybe Jasper
should report an error if the version attribute in the document doesn't agree
with the JSP version it thinks it is processing?  What do you think?
I may be able to provide diffs for a solution if I was sure what to do.

        Thanks - Mark



Reply via email to