我们的产品是在Spring 3.0 MVC中开发的.
我们在控制器中使用了如下会话.
@Controller
public class LoginController{
HttpSession session;
@RequestMapping(value="/index.htm",method = RequestMethod.POST)
public ModelAndView viewIndex(HttpServletRequest request){
session=request.getSession(false);
System.out.println(request.getSession(false));
System.out.println(session);
}
}
Run Code Online (Sandbox Code Playgroud)
在Firefox中,我可以看到两者request.getSession(false)并session打印相同的值.
在IE中,我可以看到request.getSession(false)打印值,session并打印为null.
可能是什么原因?
注意:我没有使用任何过滤器进行会话