项目的配置文件-web.xml

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了项目的配置文件-web.xml相关的知识,希望对你有一定的参考价值。

web.xml

<?xml version="1.0" encoding="utf-8">
<web-app ......>
<welcome-file-list>
<welcome-file>/pages/login.html<welcome-file>
</welcome-file-list>
<display-name>etrcuk</display-name>
<description>general-portal</description>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-context.xml</param-value>
</context-param>
<listener>
<listener-class>org...ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>springMVC<servlet-name>
<servlet-class>org...DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-context</param-vlaue>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMVC<servlet-name>
<url-pattern>/web/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>CXFServlet<servlet-name>
<servlet-class>org...CXFServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet<servlet-name>
<url-pattern>/services/*</url-pattern>
<servlet-mapping>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org...CharacterEncodingFilter</filter-class>
<!--
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-vlaue>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-vlaue>
</init-param>-->
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
<filter-mapping>
<filter>
<filter-name>shiroFilter</filter-name>
<filter-class>org...DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-vlaue>
</init-param>
</filter>
<filter-mapping>
<filter-name>shiroFilter</filter-name>
<url-pattern>/*</url-pattern>
<filter-mapping>
</web-app>


































































以上是关于项目的配置文件-web.xml的主要内容,如果未能解决你的问题,请参考以下文章

idea中添加web.xml配置文件与tomcat启动中遇到的web.xml文件找不到的问题

SSH项目搭建——web.xml文件配置

web.xml配置文件详解

项目的配置文件-web.xml

分布式项目web.xml配置文件的表头

java web项目 web.xml中如何读取properties配置文件中的值?