Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check empty string in jsp

Tags:

jsp

struts

How to check for Empty String/Null String in Struts-JSP page.

Struts Tag - does not works?

like image 796
minil Avatar asked Aug 03 '10 17:08

minil


2 Answers

See below:

<c:if test='${not empty param.whatever}'>
   ...
</c:if>
like image 106
Taylor Leese Avatar answered Nov 08 '22 11:11

Taylor Leese


<logic:empty param="<%= yourString %>">

or if the string you want to check is a property of a bean :

<logic:empty name="yourBean" property="yourBeanStringProperty">
like image 27
kgautron Avatar answered Nov 08 '22 09:11

kgautron