<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <servlet> <servlet-name>ShoppingServlet</servlet-name> <servlet-class>com.myTest.ShoppingServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ShoppingServlet</servlet-name> <url-pattern>/shop/ShoppingServlet</url-pattern> </servlet-mapping> </web-app>
<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 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_3_0.xsd"> <servlet> <servlet-name>Spring MVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <!-- 表示启动容器时初始化该servlet --> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:Spring-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring MVC</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app>
END 十期推荐 【261期】面试官:说出几个你熟悉的 Zookeeper 命令 【262期】面试官:谈谈MySQL主从复制的原理 【263期】面试最后一问:你有什么要问我的吗? 【264期】盘点MySQL主从复制,在面试中能被问什么? 【265期】面试官:为什么Integer用==比较时127相等而128不相等? 【266期】面试官:Redis主从集群切换数据丢失问题如何应对? 【267期】10道经典MySQL面试题 【268期】美团面试题:当你的JVM 堆内存溢出后,其他线程是否可继续工作? 【269期】链表高频面试题(包括反转、合并、相交、分割、环长等) 【270期】面试官:Spring的Bean实例化过程应该是怎样的? ? ~