Reference
JSP and Servlet Reference

Expression

Evaluates a statement and writes result to output,

<%= ... %>

Script Block

Contains some java code,

<%
...
%>

Comment

Server comments not sent to client,

<%-- ... --%>

Declaration

Defines Java code that is contained outside of the service method of the servlet,

<%!
  ...
%>

Example

<%!
private String formatDate(Date d)
{
  //TO DO format date function
}
%>

Directives

Directives to Servlet engine on how to compile page

<%@ directive attribute1="value1", ... %>

Examples

<%@ page import="java.util.*, java.io.*" %>
<%@ include file="/home.jsp" %>
<%@ page errorPage="/error.jsp" %>
<%@ page isErrorPage="true" %>