上一页 1 ··· 23 24 25 26 27

2014年8月12日

Spring配置SessionFactory

摘要: 1.不用dataSource引入hibernate.cfg.xmlBean.xml代码classpath:hibernate.cfg.xml2.丢掉hibernate.cfg.xml1>使用注解:Java代码annotatedClasses">com.bjsxt.model.Usercom.bjsx... 阅读全文

posted @ 2014-08-12 17:46 为努力骄傲 阅读(273) 评论(0) 推荐(0) 编辑

Spring之BeanFactory与ApplicationConText区别

摘要: 使用BeanFactory从xml配置文件加载bean:importorg.springframework.beans.factory.xml.XmlBeanFactory;importorg.springframework.core.io.FileSystemResource;publicclas... 阅读全文

posted @ 2014-08-12 17:26 为努力骄傲 阅读(10308) 评论(0) 推荐(0) 编辑

BeanFactory到WebApplicationContext的结构 以及bean和spring容器的关系

摘要: BeanFactory: Ioc 容器ApplicationContext: Spring容器WebApplicationContext需要ServletContext实例,也就是说它必须在拥有Web 容器的前提下才能完成启动的工作。Spring分别提供了用于启动WebApplicationCont... 阅读全文

posted @ 2014-08-12 16:08 为努力骄傲 阅读(402) 评论(0) 推荐(0) 编辑

ApplicationContext,WebApplicationContext

摘要: servletContext 是web应用程序的大环境,用于存储整个web应用程序级别的对象.ApplicationContext,WebApplicationContext 是Spring的BeanFactory,从名字中就可以知道区别拉,后者是支持web特性的BeanFactory。Spring... 阅读全文

posted @ 2014-08-12 14:57 为努力骄傲 阅读(1225) 评论(0) 推荐(0) 编辑

web 工程中利用Spring的 ApplicationContextAware接口自动注入bean

摘要: 最常用的办法就是用 ClassPathXmlApplicationContext,FileSystemClassPathXmlApplicationContext,FileSystemXmlApplicationContext 等对象去加载Spring配置文件,这样做也是可以, 但是在加载Sprin... 阅读全文

posted @ 2014-08-12 13:49 为努力骄傲 阅读(1165) 评论(0) 推荐(0) 编辑

ServletContext ActionContext ServletActionContext

摘要: 1> ServletContext--------->SessionContext>RequestContext>PageContext一个 WEB 运用程序只有一个ServletContext实例, 它是在容器(包括 JBoss, Tomcat 等)完全启动 WEB 项目之前被创建, 生命周期伴随... 阅读全文

posted @ 2014-08-12 10:59 为努力骄傲 阅读(929) 评论(0) 推荐(0) 编辑

javaweb之Filter详解

摘要: 一、概念:Filter也称之为过滤器,它是Servlet技术中比较激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源:例如Jsp, Servlet, 静态图片文件或静态 html 文件等进行拦截,从而实现一些特殊的功能。例如实现URL级别的权限访问控制、过滤敏感词... 阅读全文

posted @ 2014-08-12 10:36 为努力骄傲 阅读(456) 评论(0) 推荐(0) 编辑

2014年8月11日

ActionContext和ServletActionContext小结

摘要: 1. ActionContext在Struts2开发中,除了将请求参数自动设置到Action的字段中,我们往往也需要在Action里直接获取请求(Request)或会话(Session)的一些信息,甚至需要直接对JavaServlet Http的请求(HttpServletRequest),响应(H... 阅读全文

posted @ 2014-08-11 17:02 为努力骄傲 阅读(123) 评论(0) 推荐(0) 编辑

上一页 1 ··· 23 24 25 26 27

导航