BlogJava-williem-文章分类-标签类http://www.blogjava.net/williem/category/12310.htmlzh-cnThu, 01 Mar 2007 18:25:38 GMTThu, 01 Mar 2007 18:25:38 GMT60使用JSTL的必要条件http://www.blogjava.net/williem/articles/53879.html阔阔阔阔Tue, 20 Jun 2006 00:41:00 GMThttp://www.blogjava.net/williem/articles/53879.htmlhttp://www.blogjava.net/williem/comments/53879.htmlhttp://www.blogjava.net/williem/articles/53879.html#Feedback0http://www.blogjava.net/williem/comments/commentRss/53879.htmlhttp://www.blogjava.net/williem/services/trackbacks/53879.html使用JSTL必须经过以下步骤:
1 下载jstl.jar和standard.jar并将其复制到<tomcat_home>\webapps\myapp\lib
2  在使用的JSP页面上加入
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> //必须
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>//可选
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>//可选
    <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>//可选


阔阔 2006-06-20 08:41 发表评论
]]>
JSTL标签和Struts标签的对应参照http://www.blogjava.net/williem/articles/53686.html阔阔阔阔Mon, 19 Jun 2006 00:32:00 GMThttp://www.blogjava.net/williem/articles/53686.htmlhttp://www.blogjava.net/williem/comments/53686.htmlhttp://www.blogjava.net/williem/articles/53686.html#Feedback0http://www.blogjava.net/williem/comments/commentRss/53686.htmlhttp://www.blogjava.net/williem/services/trackbacks/53686.html <bean:cookie id="category" name="cat"/>
替换
<c:set var="category" value="${cookie['cat'].value}"/>
-------------------------------------------
<bean:define="name" value="ObjName"/>
替换
<c:set var="name" value="${ObjName}"/>
-------------------------------------------
<bean:header id="browser" name="User-Agent"/>
替换
<c:set var="browser" value="${header['User-Agent']}"/>
-------------------------------------------
<bean:include id="yahooContents" href="
http://www.yahoo.com/"/ >
替换
<c:import var="yahooContents" url="
http://www.yahoo.com/ "/>
--------------------------------------------
<bean:parameter id="color" name="clr"/>
替换
<c:set var="color" value="${param['clr']}"/>
--------------------------------------------
<bean:write name="ObjName"/>
替换
<c:out value="${ObjName}"/>
--------------------------------------------
<logic:empty name="results"/>
Your value is empty
</logic>
替换
<c:if test="${empty results}">
Your value is empty
</c:if>
--------------------------------------------
<logic:equal name="val" value="0">
val=0
</logic:equal>
替换
<c:if test="${value==0}">
val=0
<c:if>
--------------------------------------------
<logic:greaterEqual name="count" value="5">
Count is greater than or equal to five
</logic:greaterEqual>
替换
<c:if test="${count>=5}">
Count is greater than or equal to five
</c:if>
--------------------------------------------
<logic:iterate id="result" collection="<%=results%>">
Result:<%=result%><bt>
</logic:iterate>
替换
<c:forEach var="result" items="${results}">
Result:<c:out value="${result}"/>
</c:forEach>
--------------------------------------------
<logic:notEmpty name="results">
Results is not empty
</logic:notEmpty>
替换
<c:if test="${!empty results}">
Results is not empty
</c:if>
---------------------------------------------
<logic:notEqual name="count" value="0">
Count is not equal to zero
</logic:notEqual>
替换
<c:if test="${count!=0}">
Count is not equal to zero
</c:if>



阔阔 2006-06-19 08:32 发表评论
]]>