Class 2 |
Intermediate Java 30-IT-397 |
|
Scripting Elements
-
The Java of the JSP lives in the scripting elements.
-
Expressions, beginning wtih <%= and ending with %>, are evaluated
and the result is inserted into the generated HTML.
-
Scriptlets, beginning with <% and ending with %>, are insterted into
the _jspServlet method, which is called by service.
-
Declarations allow you to declare variables. They begin with <%!
and end with %>
-
Template text is static HTML in your JSP. You can often use this
for laying out the page and other non-calculation purposes.
-
You are free to use any editor you wish to generate this HTML.
-
Exception 1: Comments are now <%-- --%>, not <!-- -->
-
Exception 2: If you really want to print <%, you have to escape out
the %. Example: <\%
JSP Expressions

Created by: Brandan Jones
December 17, 2001