上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: The main part of this piece of configuration is the secureResourceFilter, this is a class that implements FilterInvocationDefinitionSource and is called when Spring Security needs to check the Aut... 阅读全文
posted @ 2008-11-20 08:55 Earl_86 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Pathway from ACEGI to Spring Security 2.0Submitted by Chris.Baker on Tue, 2008/04/22 - 9:44am.This article outlines how to convert your existing ACEGI based Spring application to use Spring Security 2... 阅读全文
posted @ 2008-11-20 08:42 Earl_86 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 在Struts2里,如果需要在Action中使用session,可以通过下面两种方式得到1.通过ActionContext class中的方法getSession得到2.Action实现org.apache.struts2.interceptor.SessionAware接口的方式来对session进行操作 下面先看一个采用第一种方式,在action中得到session的例子package s2.... 阅读全文
posted @ 2008-11-14 01:34 Earl_86 阅读(174) 评论(0) 推荐(0) 编辑
摘要: struts2的action中获得request response session关键字: struts2在struts2中有两种方式可以得到这些对象 1、非IoC方式 要获得上述对象,关键Struts 2中com.opensymphony.xwork2.ActionContext类。我们可以通过它的静态方法getContext()获取当前Action的上下文对象。有了这个对象我... 阅读全文
posted @ 2008-11-14 01:33 Earl_86 阅读(483) 评论(0) 推荐(0) 编辑
摘要: web.xml index.jsp struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* //struts.xml success.jsp ... 阅读全文
posted @ 2008-11-13 20:55 Earl_86 阅读(5627) 评论(0) 推荐(0) 编辑
摘要: ***************1.[一般推荐使用](只能获得request,而response则得不到)**********************ActionContext.getContext().put("liuwei", "andy"); //request.setAttribute("liuwei", "andy"); Map map=ActionContext.getConte... 阅读全文
posted @ 2008-11-13 20:46 Earl_86 阅读(810) 评论(0) 推荐(0) 编辑
摘要: 在Struts2里,如果需要在Action中使用session,可以通过下面两种方式得到 1.通过ActionContext class中的方法getSession得到 2.Action实现org.apache.struts2.interceptor.SessionAware接口的方式来对session进行操作 下面先看一个采用第一种方式,在action中得到session的例子 ... 阅读全文
posted @ 2008-11-13 20:14 Earl_86 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 在struts1中,获得到系统的request或者session对象非常方便,都是按照形参传递的,但是在struts2中,request和session都被隐藏了struts提供两种方式访问session和request,其中比较常用的是利用SPRING里面所说的IOC即控制反转IOC方式:action类实现ServletRequestAware接口,并新建一个HttpServletRequest... 阅读全文
posted @ 2008-11-13 20:11 Earl_86 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 如何比较两个有可能为null的实例 以前在写程序的时候,碰到需要比较两个有可能为null的实例时,为了避免出现NullPointerException,经常用这样的一段代码来比较: Object obj1 = "abc"; Object obj2 = "cde"; if ((obj1 == null && obj2 == null) || (obj1 !=... 阅读全文
posted @ 2008-11-09 16:37 Earl_86 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1 Eclipse下载EMF,GEF - Graphical Editor Framework,UML2,VE - Visual Editor都在这里下载http://www.eclipse.org/downloads/index.php2 lomboz J2EE插件,开发JSP,EJBhttp://forge.objectweb.org/projects/lomboz3 MyEclipse... 阅读全文
posted @ 2008-11-09 16:31 Earl_86 阅读(236) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页