JSP Taglib directive by R4R Team

 JSP Taglib directive:

The JSP taglib directive is used to define a tag library that defines many tags. We use the TLD (Tag Library Descriptor) file to define the tags. In the custom tag section we will use this tag so it will be better to learn it in custom tag.

Syntax JSP Taglib directive:

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

Example: JSP Taglib directive

In this example, we are using our tag named currentDate. To use this tag we must specify the taglib directive so the container may get information about the tag.

<html>

<body>

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

<mytag:currentDate/>

</body>

</html>

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!