Chapter 9. JSP Syntax

JSP Syntax

In Chapter 8, “JSP Basics,” you learned that a JSP page can have Java code and HTML tags. More formally, you can say that a JSP page has elements and template data. The elements, which also are called JSP tags, make up the syntax and semantics of JSP. Template data is everything else. Template data includes parts that the JSP container does not understand, such as HTML tags.

There are three types of elements:

  • Directive elements

  • Scripting elements

  • Action elements

To write an effective JSP page, you need to understand all these elements well. Elements have two forms: the XML form and the <% … %> alternative form. The conversion between ...

Get Java for the Web with Servlets, JSP, and EJB: A Developer’s Guide to J2EE Solutions now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.