随笔分类 -  web

web中servletcontext和applicationContext
摘要:参看:http://www.cnblogs.com/isisbenben/p/5594323.html servletContext和ApplicationContext有什么区别 servletContext:是web容器的东西,一个webapp一个,比session作用范围要大,从中得到很多信息 阅读全文

posted @ 2017-06-30 14:06 世界之大追梦者 阅读(1561) 评论(0) 推荐(0)

web请求乱码问题总结
摘要:问题1:springmvc通过@ResponseBody向页面返回值(包括汉字)时,乱码 解决方案: springmvc3.2之后可以声明注解驱动器(不知道是不是这么翻译)的时候的控制编码的转换,结果就这么解决了,太帅气了! 问题2:(注意:此方法只能解决post请求的乱码) jsp页面中文输入,到 阅读全文

posted @ 2017-05-26 20:20 世界之大追梦者 阅读(225) 评论(0) 推荐(0)

web.xml中配置Spring中applicationContext.xml的方式
摘要:2011-11-08 16:29web.xml中配置Spring中applicationContext.xml的方式使用web.xml方式加载Spring时,获取Spring applicationContext.xml的方式1、servlet方式加载:【web.xml】 dispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:applicationContext.xml 2、listener方式加载:【web.xml】在web.xml里配置List. 阅读全文

posted @ 2013-07-16 19:23 世界之大追梦者 阅读(2029) 评论(0) 推荐(0)

web.xml中classpath:和classpath*: 有什么区别?
摘要:web.xml中classpath:和classpath*:IccBoYapplicationContext.xml 配置文件的存放位置web.xml中classpath:和classpath*:有什么区别?classpath:只会到你的class路径中查找找文件;classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找.存放位置:1:src下面需要在web.xml中定义如下:contextConfigLocationclasspath:applicationContext.xml2:WEB-INF下面需要在web.xml中定义如下:contextConfig 阅读全文

posted @ 2013-07-16 19:06 世界之大追梦者 阅读(2274) 评论(0) 推荐(0)

web.xml详解
摘要:1.context-param 元素用来设定web站台的环境参数(context),它包含两个子元素:param-name和param-value.参数名称设定Context名称值设定Context名称的值范例: param_name param_value此所设定的参数,在JSP网页中可以使用下列方法来取得:${initParam.param_name}若在Servlet可以使用下列方法来获得:String param_name=getServletContext().getInitParamter("param_name");2.filter元素用来声明filter的相 阅读全文

posted @ 2013-07-16 15:08 世界之大追梦者 阅读(198) 评论(0) 推荐(0)

导航