struts1.2+spring2.0+hibernate
我用aop来验证权限,完了之后要怎么跳到一个页面 呢?
package net.ch.aop;
import org.aspectj.lang.JoinPoint;/**
- 权限验证类
-
@author Administrator
*
/
public class SecurityBiz{
/**- 权限处理方法
- @param point
-
@throws Exception
*/
public void before(JoinPoint point) throws Exception
{System.err.println("您正在执行:"+point.getTarget().getClass().getName()+" 的:"+point.getSignature().getName()+"方法!");
System.out.println("验证权限中....");
System.out.println("pass");
//throw new net.ch.aop.exception.SecurityException("e");
}
}
我试过用struts配置文件来捕捉异常跳转但是也不行,请大家帮_帮_忙,急啊,先谢过了。
问题补充:
首先感谢的zxowl的回答,但是我就是不想到过滤器里验证啊,通过AOP我就可以指定哪些类和方法。
我试过用ThreadLocal 加filter但是好象出了点问题,明天我抱空异常,赶明儿我再试试。