关于springMCV-spring-hibernate基础web.xml配置
2017-03-09 19:24
423 查看
<display-name>Archetype Created Web Application</display-name> <!-- springmvc 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> <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> <!-- 1. 创建Spring的监听器 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- 2. Spring的监听器通过context-param获取applicationContext.xml的位置 --> <context-param> <param-name>contextConfigLocation</param-name> <!-- applicationContext.xml的位置classpath默认在src/main/resouces下 --> <param-value>classpath:applicationContext.xml</param-value> </context-param> <!-- 指定springMVC servlet 用来响应所有.do为后缀的请求 --> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <!-- 指定spring配置文件名在src目录下 --> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!-- 打开项目默认界面 --> <welcome-file-list> <welcome-file>login.do</welcome-file> </welcome-file-list>
相关文章推荐
- 关于搭建restful web service + springMVC + ibatis/hibernate的整合和XML配置意思和ssh+springMVC框架搭建
- jsf、Spring、Hibernate 集成 web.xml配置文件
- 关于使用Spring和hibernate开发web程序的配置说明和简单实例的详细说明
- 关于使用spring需要在web.xml配置的内容的解析
- 关于项目中web.xml配置文件里面的spring的配置contextConfigLocation
- zz[Java基础]关于web.xml配置的详细说明
- Spring 的applicationContext中引入hibernate的写法+web.xml 中带Spring,flex,quartz的配置+servicesBeans。xml+daoBeans。xml
- 关于flex和spring+hibernate整合web.xml的错误
- ssh整合!Struts.xml、hibernate与spring整合的applicationContext.xml、web.xml文件的配置!
- 关于SSH框架配置文件 Hibernate.cfg.xml 、struts.xml、spring.xml
- Struts2 + Spring + Hibernate 整合 web.xml的一般配置
- 在eclipse中关于Spring和Hibernate 的XML配置如何提示类的包路径的办法
- 关于如何在web.xml中配置spring
- Spring整合Hibernate的XML文件配置,以及web.xml文件配置
- SpringMVC+Hibernate+jQuery+js+css+jsp+nginx整合时,(1)jsp引入js,css无效;(2)插入数据库时某字段为空;(3)web.xml配置完后,从数据库读数
- 关于web.xml启动spring容器的配置文件的建议
- SSH开发环境的配置:web.xml、Spring集成hibernate和Spring集成Struts2
- Struts+Spring+Hibernate实现上传下载(spring的最低框架配置,web.xml等)
- 关于spring 在web.xml 中的配置问题
- spring+hibernate整合web.xml、applicationContext.xml配置