Declarations
The last kind of JSP scripting element is the declaration.
In contrast to expressions, JSP declarations give us a fundamentally new functionality, which cannot be achieved with scriptlets alone.
They allow code to be inserted at the top level of the Servlet class definition, outside the the body of the request-handling method.
The syntax of a declaration element is:
<%! Java declaration in here %>
- Distinguished from a scriptlet by the ! sign attached to <% .