JSP Declaration Tag

Prev Tutorial Next Tutorial

JSP Declaration Tag

This is used to declare variable and methods in jsp page will be translate and define as class scope declaration in .java file.

The variable and methods will become global to that jsp. It means in that jsp we can use those variables any where and we can call those method any where.

At the time of translation container inserts the declaration tag into the class. So the variables become instants variables and methods will become instants methods.

The code written inside the jsp declaration tag is placed outside the service() method of auto-generated Servlet, so it does not get memory at each request.


<%! variable declaration or method declaration %>

Prev Tutorial Next Tutorial

Download Projects


FREE Online Google Play APK Downloader

Buy APP Installs, Buy 100% Genuine Installs