问答详情
源自:1-2 SSH-案例准备工作

web.xml文件

请问谁有那个web.xml文件吗

提问者:HooDee 2018-12-20 10:55

个回答

  • qq_爷的霸气你值得拥有_0
    2018-12-20 22:50:02

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
      <display-name>sshpro</display-name>
      
      <!-- Struts2核心过滤器 -->
      <filter>
      <filter-name>struts</filter-name>
      <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
      </filter>
      <filter-mapping>
      <filter-name>struts</filter-name>
      <url-pattern>/*</url-pattern>
      </filter-mapping>
      
      <!-- Spring的核心监听器 -->
      <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:applicationContext.xml</param-value>
      </context-param>
      <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      
      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>