6.6 ELEMENTS IN A JSP PAGE

A JSP can be considered to be a higher level abstraction of a Servlet since JSP's are converted into Servlets. So, it follows that things that can be accomplished by a Servlet can also be done by JSP. However, JSP contains HTML and is fundamentally in the form of an HTML page – in fact it is referred to as a JSP page. A JSP page contains static elements and dynamic elements. The static elements form the HTML, WML (Wireless Markup Language) or XML and the dynamic elements in Java scriptlets. The JSP elements are in between the <% and %> tags. The following are the tags that are used.

6.6.1 Declarations

JSP Declarations are used to declare members of the (servlet) class. This applies to methods as well as variables. It ...

Get Web Technology: Theory and Practice 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.