Defines a tag library and prefix for the custom tags used in the JSP page.
<%@ taglib uri="
URIToTagLibrary" prefix="
tagPrefix" %>
<%@ taglib uri="http://www.jspcentral.com/tags" prefix="public" %> <public:loop> . . </public:loop>
The taglib
directive declares that the JSP file uses custom tags, names the tag library that defines them, and specifies their tag prefix.
You must use a taglib
directive before you use the custom tag in a JSP file. You can use more than one taglib
directive in a JSP file, but the prefix defined in each must be unique.
In JSP 1.0, the method of creating portable custom tags that can be recognized by any servlet engine is not yet defined. Some JSP engines might allow you to create custom tags, but those tags might not be recognized by other JSP engines.
uri="
URIToTagLibrary"
The Uniform Resource Identifier (URI) that uniquely names the set of custom tags associated with the named tag prefix. A URI can be any of the following:
prefix="
tagPrefix"
The prefix that precedes the custom tag name, for example, public
in <public:loop>
. Empty prefixes are illegal. If you are developing or using custom tags, you cannot use the tag prefixes jsp
, jspx
, java
, javax
, servlet
, sun
, and sunw
, as they are reserved by Sun Microsystems.
http://www.hut.fi/u/jkorpela/rfc/2396/full.html