日期:2014-05-16 浏览次数:20321 次
JSTL: Jsp Standard Tag Libraries
?
JSTL is a collection of custom tags libraries. It provides common functionality that many web applications need. JSTL provides support for presentation logic (core), formatting (format), XML support (XML) and database access (SQL).
?
Expression Language (EL)
One of the limitations of JSP1.2 and earlier is that it relies heavily on Java scriptlets and Java expressions, which do not fit in the scripting and templating model that JSP espouses. With EL, you can retrieve and manipulate values in JSP scopes (session, request, page, application), headers, and parameters.
${对象.属性}? 或 ${对象[属性]}? 标准形式
?
?
<c:out value="${tagInfo.name}" default="default" escapeXml="false"/>
Out标签: value 是要输出的对象,default是当要输出的对象为null的时候,默认的输出。若对象中包含xml敏感字符,如: <,>,/的时候,escapeXml若设为false,生成的html页面就认为这些字符是xml标签,不会将其直接显示为文本形式。
?
?
<c:set