[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

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
0
willa666
Asked:
willa666
1 Solution
 
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now