Web. xml file
Label:
1. <web-app> Top level label, all Web. XML must contain this tag. In this tab, the current servlet version and some other information are described.
2. <servlet> is used to define and servlet related information, including the following four word tags:
<servlet-name>
<servlet-class>
<description>
<display-name>: Provides some GUI tools that may be used to display text information for a servlet
3. <servlet-mapping> The label is typically paired with the <servlet> tag to map the servlet to a user-accessible web path. which
<url-pattern> defines the accessible web path, but be aware that the path must begin with "/". The content in <url-pattern></url-pattern> is just an access path,
You can set this access path to any form, or even to a Web program in another language, as follows:
<url-pattern>/first.php</url-pattern>
<servlet-mapping> and <servlet> are many-to-one relationships, that is, multiple <servlet-mapping> can map a <servlet>, This allows you to define multiple accessible web paths for a servlet.
4.<welcome-file-list>
Note that:<welcome-file> can only be a relative path and cannot be an absolute path.
<welcome-file> can be any form of relative path, but cannot be preceded by "/", which differs from <url-pattern>. (actually remember this is relative path,<url-pattern> not, relative path is not required/start)
Web. XML of Java