hibernate

ssh中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_3_0.xsd"
version="3.0">
<display-name>StuinfoCRUDForSSH</display-name>


  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <!-- spring 配置 -->
      <listener>  
        <listener-class>org.springframework.web.context.ContextLoaderListener </listener-class>
    </listener>  
    <!-- 当spring applicationContext.xml没有放在src目录下可以通过classpath进行配置 -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
            <param-value>classpath:conf/spring/applicationContext.xml</param-value>
    </context-param>
    <!-- struts2 web配置 -->
   <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
         <!-- 以下参数是当struts.xml文件不再src目录下需要在web目录下配置 -->
         <init-param>  
        <param-name>config</param-name>  
        <param-value>struts-default.xml,struts-plugin.xml,conf/struts2/struts.xml</param-value>  
    </init-param>  
    </filter>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app>

posted @ 2017-06-13 11:21  我市小到中雨  阅读(105)  评论(0编辑  收藏  举报