<servlet-mapping>中的为什么用<url-pattern> ,而 <taglib>中,使用<taglib-uri>
<web-app>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>mypack.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/dispatcher</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/mytaglib</taglib-uri>
<taglib-location>/WEB-INF/mytaglib.tld</taglib-location>
</taglib>
</web-app>
What is a URI? Every resource available on the Web - HTML documents, images, video clips, programs, etc. - is located by a Universal Resource Identifier (URI).
URL is the abbreviation of Uniform Resource Location, translated as "Uniform Resource Locator". In layman's terms, URL is a string used to describe information resources on the Internet, and is mainly used in various WWW client programs and server programs. URLs can be used to describe various information resources in a unified format, including files, server addresses and directories, etc.What is URL:
The difference is that URI defines a resource, while URL not only defines the resource, but also defines how to find the resource. For example, on a server, the absolute path to a folder/webpage is the URI.
URL is a specific URI that not only uniquely identifies a resource, but also provides information to locate the resource. URI is a semantic abstract concept that can be absolute or relative, while URL must provide enough information for positioning, so it is absolute, while the usually relative URL is for another Absolute URL is still absolute in nature.