解决方案:
<c:if test="${user.headImg!=null && !(user.headImg).equals('')}"> <img src="${ctx}${headImgUrl}${user.headImg}" style=" width: 40px; border-radius: 50%; border: 3px solid #c2ccd1; "></c:if> <c:if test="${user.headImg==null || (user.headImg).equals('')}"> <img src="${ctxStatic}/bootstrap/2.3.1/img/head_pic.png"></c:if>
改为
<c:if test="${user.headImg!=null && !(user.headImg eq(''))}"> <img src="${ctx}${headImgUrl}${user.headImg}" style=" width: 40px; border-radius: 50%; border: 3px solid #c2ccd1; "></c:if> <c:if test="${user.headImg==null || user.headImg eq('')}"> <img src="${ctxStatic}/bootstrap/2.3.1/img/head_pic.png"></c:if>