putList Empty

If i have a tiles definition in a struts based application and i want to tets it to see if the list is empty how can this be done?

I assume an IF statemnet is the easyest way to do this test.

<c:if test="**somthing** != ' ' ">

the putList name is contentCenterList
LVL 1
willa666Asked:
Who is Participating?
 
bloodredsunCommented:
Try the "empty" keyword. It will work for Lists (although not Sets)

<c:if test='${empty myList}'>
...
</c:if>
0
 
willa666Author Commented:
hey BRS

i was going to settle for this:
      <c:when test="${myList != null} -- ${myList != null}">

But the empty keyword works for me! :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.