JSP Taglib Directive


The JSP taglib directive is made in use to explain a tag library that defines many tags. We use the Tag Library Descriptor (TLD) file to explain the tags. In the custom tag area, we will make use of this tag so it will be good to study it in a custom tag.

Syntax JSP Taglib Directive

<%@ taglib uri="uriofthetaglibrary" prefix="prefixoftaglibrary" %>

Example of JSP Taglib Directive

We are going to use our tag named currentDate in the below given example. To use this tag we should describe the taglib directive so the container may get information(knowledge) about the tag.

<%@ taglib uri="http://www.javatpoint.com/tags" prefix="mytag" %>