Programming Blog

This blog is about technical and programming questions and there solutions. I also cover programs that were asked in various interviews, it will help you to crack the coding round of various interviews

Wednesday 28 February 2018

JSP Directives

What are JSP Directives?

  • JSP directives are the messages to JSP container. They provide global information about an entire JSP page.
  • JSP directives are used to give special instruction to a container for translation of JSP to servlet code.
  • In JSP lifecycle phase, JSP has to be converted to a servlet which is the translation phase.
  • They give instructions to the container on how to handle certain aspects of JSP processing
  • Directives can have many attributes by comma separated as key-value pairs.
  • In JSP, directive is described in <%@ %> tags.
The syntax of Directive:

<%@ directive attribute="" %>

There are three types of directives:
  1. Page directive
  2. Include directive
  3. Taglib directives
I will describe it in further posts.


No comments:

Post a Comment