部署描述符就是一个配置文件,通常存在于web应用程序根目录的WEB-INF
文件中的web.xml
web.xml就是部署通配符,部署通配符就是web.xml
长这样:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<servlet>
<servlet-name>index</servlet-name>
<servlet-class>works.loginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>index</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>
</web-app>