Taglib directive is used to define tag libraries in JSP page. It enables user to use custom tags within JSP file. A JSP page can contains more than one taglib directives.

Syntax of Taglib Directive

Here, uri represents the path of tag library description and prefix represent the name of custom tag.

Example of Taglib directive

Here is a simple example of taglib directive. To run this code you need to add jstl jar file within lib directory of your project. It is better to run this code after learning JSTL.


We will learn more about taglib directive in JSP custom tag.

Pin It on Pinterest

Share This