tags:

views:

137

answers:

2

How do I properly declare a or statement i try this without success:

<c:forEach var="route" items="${map.street}"> <c:if test="${route.value.type == 'road' || route.value.type == 'street'}">

A: 

Bitwise inclusive OR --> |

Logical OR --> ||

So...

if ( true || false )
{
    /* the first expression is evaluated, it is true, we enter the 'if' block */
}

int i = 1 | 0;  /* i == 1 */
Ed Swangren
Thats not exactly what i post?
JorgeO
I'm sorry aparently an enum error, the type road doesnt exist? Your answer was correct
JorgeO
+1  A: 

According to http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html the || should work. When using el, I generally use 'or' instead of '||' but I'm not sure why I do that.

digitaljoel