问题描述
如题,/**.jsp,action请求都能够很好的控制,就是ajax和redirect:/**.jsp不能处理,ajax完全就没到改方法里面去}@RequestMapping("/security/getPermissionByRID_ajaX.do")publicvoidgetPermissionByRID_ajaX(HttpServletRequestrequest,PrintWriterprintWriter)throwsSQLException{intrid=Integer.parseInt(request.getParameter("rid"));System.out.println("rid:"+rid);List<Permission>list=iPermissionService.getPermissionByRID2(rid);StringBuffermsg=newStringBuffer();for(inti=0;i<list.size();i++){System.out.println(list.get(i).getPid()+list.get(i).getPname()+list.get(i).getPurl());msg.append(list.get(i).getPid()).append("||").append(list.get(i).getPname());if(!((i+1)==list.size()))msg.append(",");}System.out.println("--------------"+msg.toString());printWriter.write(msg.toString());}
权限中存在/security/getPermissionByRID_ajaX.doreturn"redirect:/security/list_permission.jsp";
/security/list_permission.jsp这样能够正常访问,为了测试,权限里面有redirect:/security/list_permission.jsp和/security/list_permission.jsp这2个权限都有,但是redirect:/security/list_permission.jsp就是不能访问
解决方案
解决方案二:
redirect:/security/xxx.doxxx.do里放return"list_permission.jsp"