Mantis - Resin
Viewing Issue Advanced Details
3228 major always 01-08-09 01:54 09-08-09 11:21
jens  
ferg  
normal  
closed 3.2.1  
fixed  
none    
none 4.0.2  
0003228: Recursive tag files with JspFragment attributes fails
It's not possible to write a recursive tag file that makes use of a fragment
attribute. The compilation fails with the error message

  recursive.tag:21: jsp:attribute 'content' is not allowed as a child of an XML element.

See the attached application for a demonstration.

By changing the code slightly to:
 
  <x:recursive content="${content}" depth="${depth-1}"/>

I can get this to run on Resin. But that code will not work on Tomcat. See:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46339 [^]

The JSP specification is not very clear on how this should work.
 tag-file-recursion-bug.war [^] (2,496 bytes) 01-08-09 01:54

Notes
(0003803)
calebrichardson   
02-04-09 19:41   
This seems to be a problem even in the case of non fragment attributes.

For example given a tag file tags:tag1:

<c:if test="${true}">
  <tags:tag2>
    <jsp:attribute name="desc">
      blah blah
    </jsp:attribute>
  </tags:tag2>
  <tags:tag1/>
</c:when>

the following error occurs:

jsp:attribute 'desc' is not allowed as a child of an XML element.

while the following works:

<c:if test="${true}">
  <tags:tag2 desc="blah blah"/>
  <tags:tag1/>
</c:when>

To clarify, the attribute "desc" is not a fragment attribute.
(0004219)
ferg   
09-08-09 11:21   
jsp/10j1