J2EE Web Fundamentals Lesson 9 JSTL
description
Transcript of J2EE Web Fundamentals Lesson 9 JSTL
J2EE Web FundamentalsLesson 9
JSTL
Instructor: Dr. Segun Adekile
Outline
• Objectives• Course Text Book– Basham, Bryan; Sierra, Kathy; Bates, Bert (2012-
10-30). Head First Servlets and JSP (Kindle Location 1349). O'Reilly Media. Kindle Edition.
• JSTL
Objectives
Agenda• <c:forEach>• <c:if>• <c:choose>• <c:out>• <c:set>• <c:remove>• <c:import>• <c:url>• Error pages• <c:catch>
JSTL – JSP Standard Tag Library
<c:forEach>
<c:forEach>
<c:forEach>
<c:if>
<c:if>
<c:choose>
<c:choose>
<c:out>• It is used to output to the current JspWriter. This is
similar to using the JSP expression <%=scripting language expression %> to write dynamic data to the client.
• The value to be written to the JspWriter is specified as a value attribute. You can use expressions in the value attribute. This allows for the resulting evaluation to be sent to the JspWriter. The <c:out> tag can perform XML character-entity encoding for <, >, &, ", and '. This means that a < will be automatically encoded to <.
<c:out> example
<c:out> example
<c:set>
<c:set>
<c:set>
<c:remove>
<c:import>
<c:url>
Error pages
Error pages
Error pages
Error pages
<c:catch>
Recap