<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>
迷茫2017-04-17 17:49:45
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).
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.
ringa_lee2017-04-17 17:49:45
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.