Declaration tag is used to declare one or more variables or methods at class level. Variables and methods declare in declaration tag are initialized at the time of JSP initialization. These variables and methods are kept outside of the service method by web container to make them class level.
Syntax:
<Example:
welcome.jsp
web.xml
Output:
Download this example.
Next Topic: JSP Expression tag with example.
Previous Topic: JSP Scriptlet tag with example.
