You summed it up perfectly. And that test case works for me too. As does my own now. I've no idea what I changed between last night and now, but everything's now fine! I'm glad of that but I hate mystery bugs...

L.

Kris Schneider wrote:
This worked on TC 5.0.28:

/WEB-INF/tags/tag1.tag:
-----------------------
<%@ tag body-content="empty" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags/" %>

<tags:tag2/>

/WEB-INF/tags/tag2.tag:
-----------------------
<%@ tag body-content="empty" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>

<c:forEach var="v" begin="0" end="${2 + 2}">
    <p>v: ${v}</p>
</c:forEach>

tagfile.jsp:
------------
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags/" %>

<html>
    <body>
        <tags:tag1/>
    </body>
</html>

Which generated:

<html>
    <body>
        <p>v: 0</p>
        <p>v: 1</p>
        <p>v: 2</p>
        <p>v: 3</p>
        <p>v: 4</p>
    </body>
</html>

Is that what you were trying to do?

Quoting Laurie Harper <[EMAIL PROTECTED]>:


Sorry for the off-topic post but I'm sure someone here will be able to tell me what's going on with this... I'm trying to use the JSTL forEach tag in a tag file invoked by another tag file and I'm getting an error. Here's an example piece of JSP:

  <c:forEach var="v" begin="0" end="${2 + 2}">
    <p>v: ${v}</p>
  </c:forEach>

That works fine in a JSP. It works fine in a tag file invoked from a JSP. But if the tag file is invoked from another tag file, I get the error "According to TLD or attribute directive in tag file, attribute end does not accept any expressions." I can use the expression language in other places (e.g. outside of custom tags) though.

Is this a limitation of tag files or of Tomcat's implementation of them? Or am I just doing something wrong? If it's a limitation of the JSP spec and/or Tomcat, is there a work-around? Otherwise tag files are about to become a whole lot less useful to me... :-(

L.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to