Defines standard JSP elements and namespace attributes of tag libraries.
None. However, see Taglib Directive.
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" [ xmlns:taglibPrefix="URI
" ]+ ... version="1.2">JSP Page
</jsp:root>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:public="http://www.jspcentral.com/tags" version="1.2"> <public:loop> ... </public:loop> </jsp:root>
A JSP page in XML syntax has jsp:root
as its root element. Tag libraries used within the JSP page are represented in the root element through xmlns
attributes. The xmlns:jsp
and version
attributes are mandatory.
xmlns:jsp="http://java.sun.com/JSP/Page"
version="1.2"
xmlns:
taglibPrefix
="
URI
"
taglibPrefix
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.
URI
uniquely locates the TLD that describes the set of custom tags associated with the named prefix. URI
may be of one of two forms:
urn:jsptld:
path
.
URI
is a URI, then the TLD is located by consulting the mapping indicated in web.xml
extended using the implicit maps in the packaged tag libraries. If URI
is of the form urn:jsptld:
path
, path
is interpreted relative to the root of the web application and should resolve to a TLD file directly, or to a JAR file that has a TLD file at location META-INF/taglib.tld.