JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
Syntactic Elements of a JSP Page
This section describes syntactic elements of a JSP page: template data, JSP element, Directive element, Action element, Scripting element, Declaration element, Scriptlet element, Expression element.
From a syntactic point of view, a JSP page can be defined as:
JSP page |- Template Data |- JSP Element |- Directive Element |- Action Element |- Scripting Element |- Declaration Element |- Scriptlet Element |- Expression Element
There are two types of data in a JSP page:
There are three types of JSP elements:
Directive Element: A JSP element that provides global information for the conversion phase.
<%@ directive_name attribute=value ... %>
Action Element: A JSP element that provides actions for the execution phase.
<action_name attribute=value ...>action_body</action_name> <action_name attribute=value .../>
Scripting Element: A JSP element that provides embedded Java statements. There are three types of scripting elements:
Declaration Element: A JSP element that provides the embedded Java declaration statements to be inserted into the Servlet class.
<%! Java declaration statements %>
Scriptlet Element: A JSP element that provides the embedded Java statements to be executed as part of the service method of the Servlet class. There are two ways to write a scriptlet element:
<% Java statements %>
Expression Element: A JSP element that provides the embedded Java expressions to be evaluated as part of the service method of the Servlet class. There are two ways to write an express element:
<%= Java expression %>
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
►Syntax of JSP Pages and JSP Documents
►Syntactic Elements of a JSP Page
JSP Document - JSP Page in XML Format
JSP Document - JSP Version Error
Writing Scriptlet Element in XML Format
Writing Directive Element in XML Format
Writing Action Element in XML Format
"include" Directive and Action Elements
Execution Result of CurrentTime.jspx
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet