设为首页 加入收藏

TOP

Spring MVC应用web.xml两种配置
2014-11-24 00:08:10 来源: 作者: 【 】 浏览:5
Tags:Spring MVC 应用 web.xml 配置

Spring MVC应用web.xml两种配置


环境:


Spring 3.2.8


JDK1.6


Tomcat6.x


1、亲测可用


< xml version="1.0" encoding="UTF-8" >



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_2_5.xsd">


Lrtech_framework



springMVC


org.springframework.web.servlet.DispatcherServlet



contextConfigLocation


classpath*:conf/springdemo-servlet.xml



1




springMVC


/




encodingFilter


org.springframework.web.filter.CharacterEncodingFilter



encoding


UTF-8




forceEncoding


true





encodingFilter


/*




2、亲测不可用,网上有人说可用。


< xml version="1.0" encoding="UTF-8" >



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_2_5.xsd">


springmvc app



contextConfigLocation


classpath*:conf/springdemo-servlet.xml




org.springframework.web.context.ContextLoaderListener




springMVC


org.springframework.web.servlet.DispatcherServlet



publishContext


false




publishEvents


false



1




springMVC


/




encodingFilter


org.springframework.web.filter.CharacterEncodingFilter



encoding


UTF-8




forceEncoding


true





encodingFilter


/*




启动后报错:


Spring MVC应用web.xml两种配置


相关阅读:


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇ArcGIS 10.1 for Server 如何使用.. 下一篇epoll for qt网络模块,直接替换qt..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: