tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rashmi Rubdi <>
Subject Re: c:empty doesnt work on sets
Date Mon, 15 Jan 2007 18:48:31 GMT
Hi Martyn, 

I tested your code as follows:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="" %>

  <jsp:useBean id="mySet" scope="page" class="java.util.HashSet" />

  <c:if test="${!empty mySet}">

  <c:if test="${empty mySet}">

The above code does not print NOT EMPTY. It only prints EMPTY, on JSTL1.1 + Tomcat 5.5 (Servlet2.4

All I can think of is that your JSTL1.1 settings might be a little incorrect. 

You may want to check the taglib directives, web.xml version (if you're using Servlet 2.4),
the correct JAR files. 


----- Original Message ----
From: Martyn Hiemstra <>
Sent: Monday, January 15, 2007 4:17:58 AM
Subject: c:empty doesnt work on sets

Hi All

I have a question concerning the c:empty tag. I'm sure this question has 
been asked before but I cant find an answer anywhere.

If I test a set if it's not empty by coding like this:

<c:if test="${!empty mySet}">

I see NOT EMPTY printed on the screen if mySet is empty. If I'm not 
mistaken this should be fixed in Standard-1.1 Taglib.

Any help would be appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message