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 3428726
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:59:37+00:00 2026-05-18T06:59:37+00:00

I am working on the frontend of a project that gives me Java Expression

  • 0

I am working on the frontend of a project that gives me Java Expression Language tags to work with. In one instance I need to see if it is returning an array or just one bit of data and I don’t know how to work with it.

Example:

The page has

<p>${WebAppContext.buildings[0].location.name}</p>

which will output something like:

<p>Acme</p>

Problem is I need to output more if there is more in that buildings bit:

Something like (in pseudocode):

if isArray(${WebAppContext.buildings}){
 foreach(${WebAppContext.buildings} as foo){
    //iterate over whatever is in the array
}
}

so I can output something like:

<p>${WebAppContext.buildings[0].location.name}</p>
<p>${WebAppContext.buildings[1].location.name}</p>

I asked the Java people responsible for generating this code and they said “Dunnokindofbusyrightnowbuhbye.” so I’m hoping you folks will have some insight.

Beyond sticking the code in the page I don’t have a clue how to work with this Java Expression Language (I even had to look it up to see what the heck it is called). So any advice/resources would be helpful.


EDIT:

I’ve tried the following and am not getting any results:

<c:forEach var='building' items='${WebAppContext.buildings}'>
  <p>${building.location.name}</p>
</c:forEach>

In the source of the page it just shows:

<c:forEach var='meeting' items='[Lorg.foo.bar.baz.bat.serviceapi.webserviceobject.xsd.BuildingsWSO;@3823ff8'>
  <p></p>
</c:forEach>

I’ll admit that, not knowing anything about Java Expression Language, I don’t understand why the items=” gets translated like it does though I can see that it follows a path in the setup we use.
Now when I use:

<p>${WebAppContext.buildings[0].location.name}</p>
<p>${WebAppContext.buildings[1].location.name}</p>

I get:

<p>Krustylu Studios</p>
<p>Springfield Nuclear Power Plant</p>
  • 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-05-18T06:59:38+00:00Added an answer on May 18, 2026 at 6:59 am

    I don’t think that kind of advanced functionality is supported by EL; you can try using the JSTL c:forEach tag to iterate over your list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working a resonably sized java project that needs some sort of web
I'm working on a project where I have 2 web services that need the
I'm currtenly working on the backend logic of a java project. Frontend (GWT) will
I am working on a project that requires some image processing. The front end
This is the first time I am working for a front-end project that requires
I am currently working on a project that consists of an ASP.NET MVC 2.0
I have a project that involves three frontend developers. We're going to use backbone
I am working on an existing project that has two areas that can be
I am working on a project that requires the use of user stories and
I'm working on a C++ source analyzer project and it seems that clang is

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.