struts 2 태그 의 교체 용법(<br>)의 간단 한 용법
2038 단어 struts 2 태그
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!-- struts2 -->
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>${sessionScope.username} </h1>
<label> </label>
<!-- ValueStack books , status -->
<table>
<s:iterator value="#session.books" status="indexValue" var="book">
<!-- -->
<s:if test="#indexValue.odd == true">
<tr style="background-color:red">
</s:if>
<s:else>
<tr>
</s:else>
<td>
<!-- -->
<s:property value="#indexValue.index"/>
<!-- -->
<s:property value="#book"/>
</td>
</tr>
</s:iterator>
</table>
</body>
</html>
최종 출력 결과:
글 의 출처:
http://www.itnose.net/detail/6251909.html
더 많은 글:
http://www.itnose.net