Check if parameter exists in Expression Language

el, jsp, jstl, parameters

Solution

Use the `not empty` check.

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

Edit: If you have a parameter of the form `?username` (no value), it is safer to use `${param.username ne null}`

Problem

``` <c:if test="${param.username}" > </c:if> ``` How do I check if param.username exists??

Original source

Related problems