Chapter 2. The Scripting Elements
Topics in this Chapter:
The Three Scripting Elements
Embedded Control Flow Statements
Using Comments
Scripting Elements Applied
Having seen the syntax of a simple JSP page, the next step is to get a better understanding of the different types of tags or scripting elements used in JSP. There are five basic types of elements, as well as a special format for comments.
The first three elements—Scriptlets, Expressions, and Declarations—are collectively called scripting elements. The Scriptlet element allows Java code to be embedded directly into a JSP page. An Expression element is a Java language expression whose value is evaluated and returned as a string to the page. A Declaration element is used to declare methods ...
Get Core JSP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.