2016年8月25日

web.xml 中<context-param>与<init-param>的区别与作用

摘要: <context-param>的作用: web.xml的配置中<context-param>配置作用 1. 启动一个WEB项目的时候,容器(如:Tomcat)会去读它的配置文件web.xml.读两个节点: <listener></listener> 和 <context-param></contex 阅读全文

posted @ 2016-08-25 18:43 赵磊磊 阅读(8120) 评论(1) 推荐(0) 编辑

web.xml 中CharacterEncodingFilter类的学习

摘要: 过滤器配置 当前台JSP页面和JAVA代码中使用了不同的字符集进行编码的时候就会出现表单提交的数据或者上传/下载中文名称文件出现乱码的问题 //编码方式配置 <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.sp 阅读全文

posted @ 2016-08-25 15:05 赵磊磊 阅读(320) 评论(0) 推荐(0) 编辑

web.xml中的contextConfigLocation在spring中的作用

摘要: 在web.xml中通过contextConfigLocation配置spring, contextConfigLocation 参数定义了要装入的 Spring 配置文件。 xml代码如下: <!-- spring config --> <context-param> <param-name>con 阅读全文

posted @ 2016-08-25 14:51 赵磊磊 阅读(170) 评论(0) 推荐(0) 编辑

导航