标签:
s标签:
<%@ taglib prefix="s" uri="/struts-tags"%>
request中取值:<s:property value="#request.tipMessage"/>
request中取集合长度:<s:property value="#request.list.size()"/>
request中判断:
<s:if test="#request.list.size() != 0">
if成立了!!!
</s:if>
<s:else>
if后边可以跟else,也可以再跟elseif
</s:else>
迭代:
<s:iterator id="li" value="#request.list" status="st">
<s:property value="#li.fullName"/>
<s:property value="#li.level"/>
<s:if test="#li.userType==‘02‘ || #li.userType==‘03‘">
<s:property value="#li.agentProvinceName"/>
</s:if>
</s:iterator>
c标签:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
request中取值: request.setAttribute("name", "zhuang");
${name}
request中取对象:request.setAttribute("name", person);
${person.age}
判断:<c:if test="${empty biaoji || biaoji==‘01‘ }">
满足标记为空或者是01
</c:if>
遍历:
<c:forEach items="${list}" var="message" varStatus="index" >
<tr>
<td><c:if test="${message.type==‘01‘ }">系统消息</c:if></td>
<td>${message.content}</td>
<td>
<c:choose>
<c:when test="${message.isRead==‘01‘ }">未读</c:when>
<c:otherwise>已读</c:otherwise>
</c:choose>
</td>
<td>${message.createTime}</td>
</tr>
</c:forEach>
标签:
原文地址:http://www.cnblogs.com/zhuangwf/p/5452691.html