-
Bug
-
Resolution: Obsolete
-
Major
-
JBossAS-4.2.3.GA, JBossAS-5.1.0.GA
-
None
-
Tried both on Windows XP SP3 and latest Ubuntu.
Create a simple jsp tag that calls itself recursively, just like the one in the forum post. If you try to access a jsp that calls the tag, the server will throw a classNotFound exception for the tag class. Seems that the jsp compiler is unable to compile recursive jsp tags.
The problem is on both 4.3 and 5.1 versions, I haven't tested other versions.
Tomcat is able to compile the same tag without problems, so the first (and ugliest) workaround is (if the tag is simple enough) to compile it with Tomcat and move the compiled class to JBoss.
The file is called recur.tag and is placed under /WEB-INF/tags/myTags:
<jsp:root version="2.1"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:mytags="urn:jsptagdir:/WEB-INF/tags/myTags">
<!--
Creates an xml representation of the category tree.
-->
<!-- The category node -->
<jsp:directive.attribute name="category" type="MyObject" required="true" rtexprvalue="true" />
<!-- Children categories should be included? -->
<jsp:directive.attribute name="includeChildren" type="java.lang.Boolean" required="false" rtexprvalue="true" />
<category>
<name>${category.name}</name>
<children>
<c:if test="${includeChildren}">
<mytags:recur categoryNode="${subCategory}" includeChildren="${includeChildren}" />
</c:if>
</children>
</category>
</jsp:root>