JSTL標簽和struts2標簽應用備份
一.jstl標簽所需jar包為standard.jar和jstl.jar兩個jar包
1.常用jsp頭部
<%@ include file="/jsp/common/taglib.jsp"%>
<%@ page import="cn.com.sunrise.home.util.Constraint"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="<%@ taglib prefix="tangs" uri="/WEB-INF/pagination.tld"%>
2.常用
<c:if test="${sessionScope.userAccount == 'admin'}">
?</c:if>
<c:if test="${not empty sessionScope.userAccount}">
</c:if>
申明int rank =0;
<c:forEach var="type" items="${productTypeList}"? varStatus="ls">
??????<c:if test="${ls.first}"></c:if>
?? ???????? <c:if test="${not ls.first}"></c:if>
?? ???????? <%rank++;%>
?????</c:forEach>
js中應用jstl
if(${flag}=='0'){
???window.parent.parent.frames('iframeTop').location.replace('../jsp/top.jsp');
??}
二STRUTS2的標簽
<s:iterator value="hotNewsReviewList" status="status"? id="hotNewsReviewList">
?????????? <li class="leftli"> <span class="leftbtxiao">時間:</span><s:property value="timeBuff"/><span class="leftbtxiao"> 姓名:</span> <s:property value="userName"/> </li>
?????????? <li class="leftli">評論<span class="leftbtxiao">:</span><s:property value="reviewContent" escape="false"/> </li>
??????</s:iterator>
<s:iterator value="kprList" status="status"? id="kprList">
<s:if test="#kprList.clickTotalCount!=null">
????????<s:property value="clickTotalCount"/>
???????</s:if>
</s:iterator>
posted on 2009-09-24 16:53 tobyxiong 閱讀(575) 評論(0) 編輯 收藏 所屬分類: show page