Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8002255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:18:12+00:00 2026-06-04T16:18:12+00:00

Possible Duplicate: Evaluate empty or null JSTL c tags I’m refactoring scriptlets to JSTL

  • 0

Possible Duplicate:
Evaluate empty or null JSTL c tags

I’m refactoring scriptlets to JSTL and EL and I would like to know how to write the following in JSTL / EL:

if(sokandeList != null && sokandeList.size() > 0) { %>
...

I don’t know how to test for null and AFAIK EL can only access getters in this context so I must add a method getSize() to the sokandeList class. Correct? What should the JSTL / EL expression look like? Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:18:14+00:00Added an answer on June 4, 2026 at 4:18 pm

    Use the empty keyword, it checks both nullness and emptiness.

    <c:if test="${not empty sokandeList}">
        ...
    </c:if>
    

    Note that when your intent is to iterate over the list using <c:forEach> then it may be good to know that it already won’t run when the provided items is empty. If the <c:forEach> is directly surrounded by this check, then this check is entirely superfluous.

    See also:

    • Java EE 6 tutorial – operators in EL
    • Java EE 6 tutorial – examples of EL expressions
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Parsing blank XML tags with LXML and Python Given the following XML
Possible Duplicate: Immediately executing anonymous functions I want to immediately evaluate an anonymous function
Possible Duplicate: Does java evaluate remaining conditions after boolean result is known Why do
Possible Duplicate: how to evaluate formula passed as string in php? I have a
Possible Duplicate: Evaluate C# string with math operators So lets say I have a
Possible Duplicate: Should I include type=“text/javascript” in my SCRIPT tags? I was writing HTML
Possible Duplicate: Why does var evaluate to System.Object in “foreach (var row in table.Rows)”?
Possible Duplicate: Why does gdb evaluate sqrt(3) to 0? C newbie here. There must
Possible Duplicate: How do you evaluate a string as a clojure expression? Getting data
Possible Duplicate: Null object in javascript Hi, I've read this thread about null in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.