October 2000
Intermediate to advanced
768 pages
16h 30m
English
In this appendix
The basic JSP syntax is the same no matter what scripting language you are using. If you are familiar with Active Server Pages, the JSP syntax should look very familiar.
The <% %> tags enclose any number of lines that are interpreted as executable code. Any code within the <% %> tags is placed in the main service method of the JSP.
Example:
<%
for (int i=0; i < 10; i++)
{
out.println("Hello");
}
%>
The <%= %> tags enclose an expression whose value is inserted into the output stream.
Example:
Welcome back, <%= getFirstName() %>!
The <%! %> tags enclose a series of declarations that are placed outside the main ...
Read now
Unlock full access