<?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="3.1" metadata-complete="true"> <!--注册servlet--> <servlet> <servlet-name>Hello</servlet-name> <servlet-class>top.lostyou.servlet.HelloServlet</servlet-class> </servlet> <!-- servlet的请求路径--> <servlet-mapping> <servlet-name>Hello</servlet-name> <url-pattern>/Hello</url-pattern> </servlet-mapping> </web-app>
标签:xml,web,映射,路径,Servlet,Hello From: https://www.cnblogs.com/5ran2yl/p/16733467.html