1. --jstl的c:choose
  2. <c:choose> 
  3.     <c:when test="${!empty indexArticles10}"
  4.         <logic:iterate name="indexArticles10" scope="request" id="indexArticle" > 
  5.             <TR> 
  6.                 <TD height=22 vAlign=center width=10 align=left> 
  7.                     &nbsp; 
  8.                 </TD> 
  9.                 <TD vAlign=center width=392 align=left> 
  10.                     <A class=txt title=${indexArticle.title } 
  11.                         href="${pageContext.request.contextPath }/index/articleQuery.do?hid=2&sid=10&aid=${indexArticle.aid }">[${indexArticle.createdate }]${indexArticle.title }</A> 
  12.                     <IMG src="${pageContext.request.contextPath }/img/index/new.gif"
  13.                 </TD> 
  14.             </TR> 
  15.         </logic:iterate> 
  16.     </c:when> 
  17.     <c:otherwise> 
  18.         <tr><td><font color="#0000ff" size="3">&nbsp;&nbsp;暂无数据</font></td></tr> 
  19.     </c:otherwise> 
  20. </c:choose>