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.

Me & Jayshree Singh. Main brain behind this blog/QnA site. We have written all these article as per my personal experience. I have published it mainly to help. These articles might have some problems. So bear with me and let me know if you find any problem in any of the article. You can find me on

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">