ssm框架整合配置---web.xml,傻傻分不清楚
2017-11-24 11:20
183 查看
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" 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_3_0.xsd"> <display-name></display-name> <!-- 404错误拦截 --> <error-page> <error-code>404</error-code> <location>/error404.jsp</location> </error-page> <!-- 500错误拦截 --> <error-page> <error-code>500</error-code> <location>/error500.jsp</location> </error-page> <!-- 加载spring容器 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/classes/spring/appli 4000 cationContext-*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- 配置前端控制器 --> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <!-- ContextconfigLocation配置springmvc加载的配置文件 适配器、处理映射器等 --> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/classes/spring/springmvc.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <!-- 1、.action访问以.action结尾的 由DispatcherServlet进行解析 2、/,所有访问都由DispatcherServlet进行解析 --> <url-pattern>/</url-pattern> </servlet-mapping> <!-- 解决post乱码问题的过滤器 --> <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> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>welcome.jsp</welcome-file> </welcome-file-list> </web-app>
相关文章推荐
- 【SSM整合】-三框架整合xml文件结构及相应web.xml配置
- java ssm框架入门(三)正式项目的web.xml配置
- ssm框架web.xml中filter配置问题
- ssm整合基本配置之web.xml
- 关于搭建restful web service + springMVC + ibatis/hibernate的整合和XML配置意思和ssh+springMVC框架搭建
- 整合SSM框架的maven项目pom.xml的常见配置
- Spring+Spring Mvc+Mybatis+MySqlite(SSM框架整合Xml配置)
- SSM框架整合方式(一):XML配置文件代码
- SSM框架web.xml配置
- ssm框架创建简单的DVD管理系统(三)bootstrap的导入和web.xml及spring mvc配置
- SSM整合之web.xml的相关配置
- SSM(spring-springmvc-mybatis)整合开发xml配置文件内容springmvc-config.xml,application.xml,web.xml
- 最全三大框架整合(使用映射)——struts.xml和web.xml配置
- 使用ssm框架在web.xml中的基本配置信息
- ssm框架下web项目,web.xml配置文件的作用(详解)
- SSM框架整合方式(二):XML配置文件代码
- 【SSM整合】-Maven管理SSM框架的pom.xml配置
- ssm框架整合的配置文件applicationContext.xml
- shh整合后web.xml、spring配置文件和struts.xml的内容
- DWR框架在web.xml的完整配置及注释