Appendix A. JSP Syntax Reference
This book has covered a lot of ground. Every fundamental concept in JSP was discussed, and the example code presented important programming techniques. However, in order to maintain a reasonable flow in the text, the syntactical details of many JSP elements were not fully explored.
This appendix captures, at one location, all of the JSP elements that are covered in the text, and provides a more detailed syntax description. It should serve as a useful reference resource during your daily JSP programming activities.
JSP pages are text files composed of the following components:
Template text: Template text is any text that is not a JSP element. Template text is static and does not change between invocations of the same JSP.
JSP elements: Many JSP elements result in the dynamic generation of Web content. Because template text can be any static text, a JSP element can contain template text that is in any format. Two of the most common formats are HTML and XML.
JSP elements can be composed of the following components:
Directives
Actions
Scripting elements
Directives are typically enclosed in <%@ .... %>. For example, a JSP page directive may look like the following:
<%@ page language="java" %>
Actions are specified in standard XML notation. For example, an occurrence of the <jsp:useBean> action with a nested occurrence of the <jsp:setProperty> action may appear as follows:
<jsp:useBean id="newsfeed" class="com.wrox.begjsp.ch2.NewsFeed" scope="request" > <jsp:setProperty ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access