Defines a tag Library and the prefix of its custom tags.
JSP syntax
<% @ Taglib uri = "uritotaglibrary" prefix = "tagprefix" %>
Example
<% @ Taglib uri = "http://www.jspcentral.com/tags" prefix = "public" %>
<Public: loop>
.
.
</Public: loop>
Description
<% @ Taglib %> the command declares that the JSP file uses custom tags, reference the tag library, and specify the prefix of their tags.
Here, custom tags include tags and elements. Because JSP files can be converted to XML, it is important to understand the relationship between tags and elements. A tag is only a tag that is elevated in the sense and is part of a JSP element. JSP elements are part of the JSP syntax, and have the start tag and end tag like XML. An element can also contain other text, tags, and elements. For example, a JSP: plugin element has the <JSP: plugin> start tag and </jsp: plugin> end tag, and can also have <JSP: Params> and <JSP: fallback> element.
You must use the <% @ taglib %> command before using a custom tag, and you can use it multiple times on a page, but the prefix can only be used once.
Attribute
Uri = "uritotaglibrary"
The Uniform Resource Identifier (URI) uniquely names a custom tag Based on the tag prefix. The URI can be the following:
Uniform Resource Locator (URL), defined by RFC 2396, view the http://www.hut.fi/u/jkorpela/rfc/2396/full.html
Uniform Resource Name (URN), defined by RFC 2396
A relative or absolute path
Prefix = "tagprefix"
The prefix before the custom tag. For example, in <public: loop>, if public is not specified here, this is invalid. Do not use JSP, jspx, Java, javax, Servlet, sun, or sunw as your prefix.