锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲美女又黄又爽在线观看,国产成人高清亚洲一区91,亚洲人成电影亚洲人成9999网http://www.tkk7.com/nobody_am/category/33160.htmlzh-cnFri, 25 Jul 2008 07:05:36 GMTFri, 25 Jul 2008 07:05:36 GMT60鍝簺JSTL鍙互鍙栦唬Struts-ELhttp://www.tkk7.com/nobody_am/news/2008/07/25/217324.htmlMingIsMeMingIsMeThu, 24 Jul 2008 16:57:00 GMThttp://www.tkk7.com/nobody_am/news/2008/07/25/217324.html

Struts Tag Library

Tag

JSTL Replacement

Bean

cookie

c:set

Bean

define

c:set

Bean

header

c:set

Bean

include

c:import

Bean

parameter

c:set

Bean

write

c:out

Logic

empty

c:if, c:when

Logic

equal

c:if, c:when

Logic

greaterEqual

c:if, c:when

Logic

greaterThan

c:if, c:when

Logic

iterate

c:forEach

Logic

lessEqual

c:if, c:when

Logic

lessThan

c:if, c:when

Logic

notEmpty

c:if, c:when

Logic

notEqual

c:if, c:when


JSTL Replacement Examples

The following sections provide examples for replacing Struts tag library tags with their JSTL equivalents. Remember that not all the Bean, HTML, and Logic tags can be replaced by JSTL tags.

bean:cookie Replacement Example

The following snippet shows the basic usage of the cookie tag from the Bean Tag Library:

<bean:cookie id="category" name="cat"/>

The JSTL equivalent is as follows:

<c:set var="category" value="${cookie['cat'].value}"/>

This example accesses the cat cookie with a JSTL expression that makes use of the JSTL implicit cookie object.

bean:define Replacement Example

The following snippet shows the basic usage of the define tag from the Bean Tag Library:

<bean:define id="name" name="nameObj"/>

The JSTL equivalent is as follows:

<c:set var="name" value="${nameObj}"/>

bean:header Replacement Example

The following snippet shows the basic usage of the header tag from the Bean Tag Library:

<bean:header id="browser" name="User-Agent"/>

The JSTL equivalent is as follows:

<c:set var="browser" value="${header['User-Agent']}"/>

This example accesses the "User-Agent" header with a JSTL expression that makes use of the JSTL implicit header object.

bean:include Replacement Example

The following snippet shows the basic usage of the include tag from the Bean Tag Library:

<bean:include id="yahooContents" />

The JSTL equivalent is as follows:

<c:import var="yahooContents" url=" http://www.yahoo.com/"/>

bean:parameter Replacement Example

The following snippet shows the basic usage of the parameter tag from the Bean Tag Library:

<bean:parameter id="color" name="clr"/>

The JSTL equivalent is as follows:

<c:set var="color" value="${param['clr']}"/>

This example accesses the clr parameter with a JSTL expression that makes use of the JSTL implicit param object.

bean:write Replacement Example

The following snippet shows the basic usage of the write tag from the Bean Tag Library:

<bean:write name="bizObj"/>

The JSTL equivalent is as follows:

<c:out value="${bizObj}" />

logic:empty Replacement Example

The following snippet shows the basic usage of the empty tag from the Logic Tag Library:

<logic:empty name="results">
Your search yielded no results.
</logic:empty>

The JSTL equivalent is as follows:

<c:if test="${empty results}">
Your search yielded no results.
</c:if>

logic:equal Replacement Example

The following snippet shows the basic usage of the equal tag from the Logic Tag Library:

<logic:equal name="count" value="0">
Count is zero.
</logic:equal>

The JSTL equivalent is as follows:

<c:if test="${count == 0}">
Count is zero.
</c:if>

bean:greaterEqual Replacement Example

The following snippet shows the basic usage of the greaterEqual tag from the Logic Tag Library:

<logic:greaterEqual name="count" value="5">
Count is greater than or equal to five.
</logic:greaterEqual>

The JSTL equivalent is as follows:

<c:if test="${count >= 5}">
Count is greater than or equal to five.
</c:if>

logic:greaterThan Replacement Example

The following snippet shows the basic usage of the greaterThan tag from the Logic Tag Library:

<logic:greaterThan name="count" value="5">
Count is greater than five.
</logic:greaterThan>

The JSTL equivalent is as follows:

<c:if test="${count > 5}">
Count is greater than five.
</c:if>

logic:iterate Replacement Example

The following snippet shows the basic usage of the iterate tag from the Logic Tag Library:

<logic:iterate id="result" collection="<%=results%>">
Result: <%=result%><br>
</logic:iterate>

The JSTL equivalent is as follows:

<c:forEach var="result" items="${results}">
Result: <c:out value="${result}"/>
</c:forEach>

logic:lessEqual Replacement Example

The following snippet shows the basic usage of the lessEqual tag from the Logic Tag Library:

<logic:lessEqual name="count" value="5">
Count is less than or equal to five.
</logic:lessEqual>

The JSTL equivalent is as follows:

<c:if test="${count <= 5}">
Count is less than or equal to five.
</c:if>

logic:lessThan Replacement Example

The following snippet shows the basic usage of the lessThan tag from the Logic Tag Library:

<logic:lessThan name="count" value="5">
Count is less than five.
</logic:lessThan>

The JSTL equivalent is as follows:

<c:if test="${count < 5}">
Count is less than five.
</c:if>

logic:notEmpty Replacement Example

The following snippet shows the basic usage of the notEmpty tag from the Logic Tag Library:

<logic:notEmpty name="results">
Your search returned results!
</logic:notEmpty>

The JSTL equivalent is as follows:

<c:if test="${!empty results}">
Your search returned results!
</c:if>

logic:notEqual Replacement Example

The following snippet shows the basic usage of the notEqual tag from the Logic Tag Library:

<logic:notEqual name="count" value="0">
Count is not equal to zero.
</logic:notEqual>

The JSTL equivalent is as follows:

<c:if test="${count != 0}">
Count is not equal to zero.
</c:if>



MingIsMe 2008-07-25 00:57 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 视频一区二区三区免费观看| 亚洲国产欧美国产综合一区 | 在线看片韩国免费人成视频| 亚洲国产综合无码一区| 特级毛片免费播放| 亚洲国产精品尤物yw在线| 高h视频在线免费观看| 亚洲国产精品人人做人人爱| 免费无码国产在线观国内自拍中文字幕 | 久久青草亚洲AV无码麻豆| 国产中文字幕在线免费观看| 在线a亚洲v天堂网2019无码| 国产在线精品观看免费观看| 亚洲AV永久无码区成人网站 | 美女被免费喷白浆视频| 亚洲sss综合天堂久久久| 在线免费观看色片| 国产亚洲男人的天堂在线观看| 一区二区三区亚洲视频| 尤物视频在线免费观看| 久久精品国产亚洲夜色AV网站| **aaaaa毛片免费| 亚洲欧美第一成人网站7777| 四虎精品亚洲一区二区三区| 国产中文字幕在线免费观看| 日韩精品亚洲人成在线观看 | 亚洲精品乱码久久久久久中文字幕| 一个人免费视频观看在线www | 最新亚洲精品国偷自产在线| 免费国产小视频在线观看| 日韩久久无码免费毛片软件| 亚洲av日韩综合一区在线观看| 野花高清在线电影观看免费视频 | 亚洲午夜久久久久久久久电影网 | 亚洲国产精品国自产电影| 青青草a免费线观a| 一级毛片在线免费视频| 91亚洲性爱在线视频| 亚洲av无码天堂一区二区三区 | 亚洲国产成人久久精品动漫| 91免费资源网站入口|