JSP Directive tutorial for Java Beginners

Directive is a type of Statement which can be used to give instruction to container about doing something special at @ page transalation time.

Directive can be divided in three types

  • Page
  • Include
  • Taglib

Page Directive

Syntax of Page Directive


Uses of Page Directive

Import Package

Page directive can be used to import single or double package.

Import Single Package


Import Multiple Package 


Taglib Directive

This directive is used to define tag libraries available to JSP.

Syntax of taglib Directive

 Uses of taglib Directive

taglib directive can be useful in case of Custom tags.

Leave A Comment

Your email address will not be published. Required fields are marked *