是这样的。詹总。
写了一个登录拦截器,未登录的用户就跳转到登录页面,页面都是ajax请求。
可是页面没有跳转,f12查看了下返回的response确定是登录页面的jsp内容。
我后台是这样的:
if( null == controller.getSession().getAttribute("UID") ){
//表示没登录 跳转到登录页面
controller.render("/jsp/user/login.jsp");
// controller.forwardAction("com.wozi.base.BaseController");
}else{
inv.invoke();
}
尝试反射生成baseController,里面index再调用renderjsp。可是这样也行不通。发现封装的属性全部为空,我这样粗暴是不行的。请问有什么办法吗?