public class GotopageAction extends ActionSupport {
//时间类型
private String eventType;
//时间编号
private String eventId;
//去到页面类型
private String pageType;
public String AccessFromExternal(){
HttpServletRequest req = ServletActionContext.getRequest();
HttpSession session = req.getSession();
eventType = req.getParameter("eventType");
eventId = req.getParameter("eventId");
pageType = req.getParameter("pageType");
if(eventType!="" && eventType!=null && eventId!="" && eventId!=null){
session.setAttribute("eventType", eventType);
session.setAttribute("eventId", eventId);
}
if(pageType!="" && pageType!=null){
session.setAttribute("pageType", pageType);
}
return "goto";
}
}
有个这样的action,session里保存好参数后,在applicationContext-security.xml 里配置了一个:
后,跳转后,session里的值会丢失。但是去掉了这个配置后,就正常了,求大师指点指点