web.xml
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_3_1.xsd"
version="3.1">
Servlet
Servlet.MyServlet //中的内容是固定的,必须是"Servlet所在包的名称.Servlet类的名称"
Servlet
/Servlet/MyServlet
新建的四个标签中servlet-class标签的内容是固定的,不能随意修改
servlet-name标签中的内容自定,但两个servlet-name标签中的内容必须相同
url-pattern标签中的内容自定,如例子中url-pattern为 /Servlet/MyServlet ,tomcat端口(默认)为8080,
则启动项目后,在浏览器中输入,即可访问到servlet所定义的页面
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">