jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Jokerst" <gr...@jokerst.com>
Subject Re: <choose> <when> error in JSTL?
Date Fri, 15 Nov 2002 16:25:26 GMT
David, Thanks for the help.  You were right, but I thought the XML parser
would catch unmatched tags.  With <c:if/></c:if> there is an "if" tag
without an opening tag.

Pierre,  I am using tomcat 4.1.12 which is Servlet v2.3 and JSP v1.2 with
the jakarta-taglibs-standard-1.0.1 which should be JSTL 1.0.  It is the
latest binary, not built from CVS.  What are you using?  Are there any
good implementations of JSP v2.0 yet that support the EL?

Thanks,
Grant

> Grant,
>
> David has correctly pointed out the problem with your use of
> <c:when> in the previous email.
>
> However, I'd be curious to know which implementation of JSTL
> was used to run your JSP page.
>
> The JSTL spec, "Section 5.3 <c:choose>", clearly states the
> following:
>
>  Constraints
>  - The body of the <c:choose> action can only contain:
>    - White spaces
>      May appear anywhere around the <c:when> and <c:otherwise> subtags.
>    - 1 or more <c:when> actions
>      Must all appear before <c:otherwise>
>    - 0 or 1 <c:otherwise> action
>      Must be the last action nested within <c:choose>
>
> I wrote a simple test page replicating the error you had in your page
> (included below) using the JSTL Reference Implementation and did get the
> proper translation error:
>
>    ... Illegal text inside "c:choose" tag...
>
>
>     -- Pierre
>
> -----
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>
> <c:choose>
>   <c:when test="${!empty param.foo}"/>
>     request parameter foo is set to: <c:out value="${param.foo}"/>
>   </c:when>
>   <c:otherwise>
>     request parameter foo is not set
>   </c:otherwise>
> </c:choose>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:taglibs-dev-unsubscribe@jakarta.apache.org> For additional
> commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message