Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7496

Unable to compile recursive jsp tag.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: JBossAS-4.2.3.GA, JBossAS-5.1.0.GA
    • Fix Version/s: No Release
    • Component/s: Build System, Other
    • Labels:
      None
    • Environment:

      Tried both on Windows XP SP3 and latest Ubuntu.

      Description

      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>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rmaucher Remy Maucherat
                Reporter:
                dfghi Danilo Ghirardelli
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: