This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes x:if or-Operation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "x:if or-Operation" Watch "x:if or-Operation" New topic

x:if or-Operation

Markus Neumaier

Joined: Oct 29, 2013
Posts: 15

currently im using the following expression:

works great so far, but what i want it to do, is pass the if-statement when the userKey parameter is give OR empty.

I tried something like this:

But I dindn't find a working solution so far.


Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 213

Try this.

<c:if test="${empty param.userName}">

Markus Neumaier

Joined: Oct 29, 2013
Posts: 15
Can i check XPath expressions in a c:if? Because i have to connect them with a OR (||) (I'm asking because I did not get it to work)

Edit: Found the solution.

Actually it wasn't that hard...

I agree. Here's the link:
subject: x:if or-Operation
Similar Threads
Simple JSTL question
small problem with JSTL x tags
JSTL xml tags
Is there a way to compare 2 xpaths in JSTL?
Parsing an XML Document containing Namesapces using XPath and Xalan