• web.xml简单配置


    <?xml version="1.0" encoding="UTF-8"?>
    <!-- 基本表头 -->
    <web-app version="2.5" 
        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_2_5.xsd">
      <display-name></display-name>    
      
      <!-- 配置默认首页 -->
      <welcome-file-list>
        <welcome-file>/WEB-INF/employee/login.jsp</welcome-file>
      </welcome-file-list>
      
      <!-- 配置Struts2 -->
      <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
      </filter>
      <filter-mapping>
          <filter-name>struts2</filter-name>
          <url-pattern>/*</url-pattern>
      </filter-mapping>
      
      <!-- 配置spring3 -->
      <context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>/WEB-INF/applicationContext.xml</param-value>
      </context-param>
      <listener>
          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      
    </web-app>

    最简单配置三东西:欢迎页面,struts2和spring。

    注意class的配置,这表示包相当于在程序的根目录。

  • 相关阅读:
    L1-021 重要的话说三遍
    L1-020 帅到没朋友
    pytest--钩子
    pytest--allure
    pytest--常用插件
    pytest--高级用法
    pytest--配置文件
    pytest--控制运行
    pytest--fixture
    pytest--使用前提
  • 原文地址:https://www.cnblogs.com/run127/p/5463764.html
Copyright © 2020-2023  润新知