JSTL标签库的核心标签:
<c:out>
<c:out value="${psw }" escapeXml="${user!=null }" >aaaaaaa</c:out>
<c:set>
<c:set var="user" value="Tom" scope="page" />
<c:out value="${user }"></c:out>
<%
Map map = new HashMap();
request.setAttribute("map",map);
%>
<c:set property="city" value="baoding" target="${map }"/>
<br/>
<c:out value="${map.city }"></c:out>
<br/>
<%
Person p = new Person();
request.setAttribute("person",p);
%>
<c:set property="name" value="Susan" target="${person }" />
<c:out value="${person.name }" />
<c:remove>
<%
session.setAttribute("date","2011");
%>
${date}
<c:remove var="date" scope="session"/>
<c:out value="${date }">date被删除了</c:out>
<c:catch>
<c:catch var="myexception">
<%int i= 3/0; %>
</c:catch>
输出异常
<c:out value="${myexception }"></c:out>
<br/>
异常:
<c:out value="${myexception.message }" /><br/>
堆栈轨迹
<c:out value="${myexception.stackTrace }" /><br/>
<c:if>
<c:if test="${date == null }" var="result" scope="page">
${result }表达式成立
</c:if>
<c:forTokens>
<c:forTokens items="abc efg,xy|333" delims=" ,y|" var="item">
<c:out value="${item }"/><br/>
</c:forTokens>