Process the Java Expression Language on a page


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.


The page has


which will output something like:


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:


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.


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

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

In the source of the page it just shows:

<c:forEach var='meeting' items='[;@3823ff8'>

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:


I get:

<p>Krustylu Studios</p>
<p>Springfield Nuclear Power Plant</p>

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.