]
Danilo Ghirardelli commented on JBAS-7496:
------------------------------------------
I forgot to mention, I used java 1.6 in all the tests. Build 1.6.0_17 on windows and
1.6.0_15 on ubuntu.
Unable to compile recursive jsp tag.
------------------------------------
Key: JBAS-7496
URL:
https://jira.jboss.org/jira/browse/JBAS-7496
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Build System, Other
Affects Versions: JBossAS-4.2.3.GA, JBossAS-5.1.0.GA
Environment: Tried both on Windows XP SP3 and latest Ubuntu.
Reporter: Danilo Ghirardelli
Assignee: Paul Gier
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>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: