What is a Declaration?
A declaration declares one or more variables or methods for use later in the JSP source file.
Declaration in JSP is way to define global java variable and method. This java variable method in declaration can be access normally. Normally declaration does not produce any output, and access of this code is also limited. The declaration code does not reside inside service method of JSP. Declaration we use method to convert null convert of string in JSP.
We can see declaration code is not used to produce any direct output; it is used for reusable code.