Empty Operator in JSP Expression Language

What is an Empty Operator in JSP Expression Language?

Explanation

Empty operator in JSP Expression Language is used for prefix operation to check whether a value is empty or null.

Example :





<p>Empty Operator Example</p>
The Value for the Empty operator is:: ${empty "txxt"}


Result :



Empty Operator Example
The Value for the Empty operator is:: false



In the above example we have used the empty operator along with a text "txxt". Empty operator checks finds
the string so its not "null" so returns "false".

Ask Questions

Ask Question