The use of empty in El expression
<c:if test= "${not Empty Logisticsdetaillist}" >
<c:foreach items= "${logisticsdetaillist}" var= "List" >
<tr>
<TD align= "center" >
${list.time}
</td>
<TD align= "Left" >
<span style= "Display:block" title= "${list.contenxt}" >${list.contenxt}</span>
</td>
</tr>
</c:forEach>
</c:if>
<c:if test= "${empty logisticsdetaillist}" >
<tr>
<TD align= "center" colspan= "2" >
<span style= "color: #003688; font-weight:bold;font-size:16px" > Temporary no logistics information!</span>
</td>
</tr>
</c:if>
<c:if test= "${! Empty Key}" >${key}</c:if> or <c:if test= "${not Empty Key}" > <c:if test= "${empty Key}" "> All </c:if> Output key value when key is not empty. When key is empty, the output "all" rule: 1 if the key is null, returns True 2 if the key is an empty string, returns True 3 if the key is an empty array, returns true 4 if the key is an empty map, returns true 5 if the key is null C Returns True 6 when Ollection, returns false
Second, struts2 tags for null and empty string judgments
<s:if test= "#request .logisticsdetaillist!=null&& #request. logisticsdetaillist.size>0" >
You can also use this: <s:if test= "#request. logisticsdetaillist!=null&&! #request. Logisticsdetaillist.isempty ()" >
<c:foreach items= "${logisticsdetaillist}" var= "List" >
<tr>
<TD align= "center" >
${list.time}
</td>
<TD align= "Left" >
<span style= "Display:block" title= "${list.contenxt}" >${list.contenxt}</span>
</td>
</tr>
</c:forEach>
</s:if>
<s:if test= "#request .logisticsdetaillist!=null&& #request. logisticsdetaillist.size>0" > If a string can <s:if test= "#request .username!=null&& #request. username!=" "> Single quote
This can also be done with the same effect.