tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wallace" <pa...@isell.com.au>
Subject RE: el in JSTL / JSP 2.0
Date Thu, 29 Jul 2004 23:46:58 GMT
 
Hi,
	Tbanks for that. I was using the 2.4 schema:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

And tried (although PermittedTablibs.tld is not in the picture):

        <taglib>
            <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
            <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
        </taglib>

Using this gave me a 500 error (can't find said file). Before edition it
looked something like: 

        <taglib>
            <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
            <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
        </taglib>

The code hasn't changed (below). Are you suggesting I use that URL in
the JSP / .tag? If so, my IDE cannot resolve the library (IDEA). 

Thanks for your thoughts.

Paul. 




I had the same prob. And 2 things I did that worked:

1. try using the 2.4 schema definition in web.xml
2. if the PermittedTablibs.tld is involved make sure your <taglib-uri>
is
http://java.sun.com/jsp/jstl/core

Hi,
        I am trying to introduce JSP 2 with Tomcat 5 (full source
below), and thus experimenting with the JSTL expression language in JSP
tag files (.tag). I am bemused as to why I cannot embed the expression
language within a JSTL tag thus: 
 
    <c:forEach begin="${a}" end="${b}" varStatus="status">
 
        ${status.count} <br/>
 
    </c:forEach>
 
Tomcat is really unhappy with this:
 
org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(13,4)
According to TLD or attribute directive in tag file, attribute begin
does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:39)
............
 
the same code with <c:forEach begin="1" end="5" varStatus="status">
iterates 5 times with no trouble. I have the latest tld's from Jakarta,
status.count is displaying correctly. 
 
Any thoughts please?
 
Thanks
 
Paul.
 
jsp:
 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<tags:wrapper a="1" b="10">
    <p> Wrapped Content </p>
</tags:wrapper>
 
.tag:
 
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ tag body-content="scriptless" %>
<%@ attribute name="a" required="true" %>
<%@ attribute name="b" required="true" %>

    <p> Attributes - ${a}, ${b} </p>
 
    <c:forEach begin="${a}" end="${b}" varStatus="status">
 
        ${status.count} <br/>
 
    </c:forEach>






---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message