zoukankan      html  css  js  c++  java
  • 学习日记_SSH框架web.xml配置文件篇

    1.参考一:http://www.blogjava.net/yxhxj2006/archive/2012/07/09/382632.html
    2.参考二:
    <!-- web 容器启动spring容器  -->
    <!-- 初始化参数 -->
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>WEB-INF/classes/applicationContext.xml</param-value>
    </context-param>
    <!-- 监听器加载spring容器 -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <!-- 过滤器解决中文乱码问题 -->
    <filter>
    <filter-name>CharacterEncodingFilter</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>
    <init-param>
    <param-name>forceEncoding</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>CharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
      <!-- hibernate 延迟加载 spring-orm.jar -->
      <filter>
       <filter-name>lazy</filter-name>
       <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
      </filter>
      <filter-mapping>
       <filter-name>lazy</filter-name>
       <url-pattern>/*</url-pattern>
      </filter-mapping>
      <!-- struts2 配置 -->
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      <filter>
       <filter-name>struts2</filter-name>
       <filter-class>
       org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
       </filter-class>
      </filter>
      <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern>*.action</url-pattern>
      </filter-mapping>
  • 相关阅读:
    MapReduce&Yarn
    Linux网络配置问题
    Linux命令总结
    Hadoop优化&新特性
    Zookeeper
    idea中修改注释颜色
    Linuxbash未找到命令问题
    Hadoop3.0入门
    HDFS
    SpringBoot
  • 原文地址:https://www.cnblogs.com/beijingstruggle/p/5482044.html
Copyright © 2011-2022 走看看