待续
Core Tag Library
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="temp" value="hello world" scope="page"/>
${temp }
<c:remove var="temp"/>
<%
String[] ss={"one","two","three"};
pageContext.setAttribute("ss",ss);
%>
<c:forEach var="s" items="${pageScope.ss }">
${s}<br/>
</c:forEach>
<%
String temp="hello";
pageContext.setAttribute("temp",temp);
%>
<c:if test="${!empty temp}">
${temp }
</c:if>
<c:if test="${1==2 }">
1==2
</c:if>
<%
String temp="two";
pageContext.setAttribute("temp",temp);
%>
<c:choose>
<c:when test="${temp=='one' }">
one
</c:when>
<c:when test="${temp=='two' }">
two
</c:when>
<c:otherwise>
otherwise
</c:otherwise>
</c:choose>
<c:url var="hello" value="/jsp/hello.jsp">
<c:param name="username"> jiajia</c:param>
</c:url>
<a href="${hello}"> hello world</a>
<c:import url="/jsp/hello.jsp">
<c:param name="username" value="jiajia"></c:param>
</c:import>
XML Tag Library
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book id="1">
<name>jia</name>
<price>100</price>
</book>
<book id="2">
<name>wodwl</name>
<price>200</price>
</book>
</books>
<c:import url="/jsp/xmlTest.xml" var="xml" charEncoding="UTF-8"/></c:import>
<x:parse doc="${xml}" var="booklist" scope="application"></x:parse>
<x:forEach var="item" select="$booklist/books/book">
<x:out select="$item/@id"/>
<c:set var="name">
<x:out select="$item/name"/>
</c:set>
<c:set var="price">
<x:out select="$item/price"/>
</c:set>
<c:url var="url" value="/jsp/hello.jsp">
<c:param name="name">${name}</c:param>
<c:param name="price">${price}</c:param>
</c:url>
<a href="${url}">
<x:out select="$item/name"/>
</a>
</x:forEach>
注意:以下不加上charEncoding='utf-8"可能导致乱码
<c:import url="/jsp/xmlTest.xml" var="xml" charEncoding="UTF-8"/></c:import>