• web.xml


    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
      <display-name>bookstore01</display-name>
    
        <!--编码过滤器-->
        <filter>
            <filter-name>encoding</filter-name>
            <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
            <init-param>
                <param-name>encoding</param-name>
                <param-value>UTF-8</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>encoding</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    
        <!--中央处理器-->
        <servlet>
            <servlet-name>springmvc</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <init-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>classpath:spring-*.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>springmvc</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
    
        <servlet>
            <servlet-name>imageCode</servlet-name>
            <servlet-class>utils.CheckImageServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>imageCode</servlet-name>
            <url-pattern>/imageCode</url-pattern>
        </servlet-mapping>
    
        <filter>
            <filter-name>adminLogin</filter-name>
            <filter-class>admin.AdminLoginFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>adminLogin</filter-name>
            <url-pattern>/admin/login/*</url-pattern>
            <url-pattern>/admin/notices/*</url-pattern>
            <url-pattern>/admin/orders/*</url-pattern>
            <url-pattern>/admin/products/*</url-pattern>
        </filter-mapping>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>
  • 相关阅读:
    Python模块:shutil、序列化(json&pickle&shelve)、xml
    IO流----操作文件的9种方法代码实现
    IO流--字符流与字节流--File类常用功能
    常用集合之间的关系
    HashMap 集合的遍历
    java代码实现ftp服务器的文件上传和下载
    java中数组、集合、字符串之间的转换,以及用加强for循环遍历
    java中的正则表达式
    使用Calender类获取系统时间和时间和运算
    产生任意区间的随机数
  • 原文地址:https://www.cnblogs.com/mm163/p/11009914.html
Copyright © 2020-2023  润新知