servlet  代码:
public class FileUploadServlet extends HttpServlet {
private static final long serialVersionUID = -7825355637448948879L;
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request,response);
}
        public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try{
if(request.getSession().getAttribute("sessionmember") == null){
System.out.println("sssss");
}
Member sessionMember = (Member) request.getSession().getAttribute("sessionmember");

} catch(Exception e){

}finally{
try {
HibernateUtil.endSession();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}在IE 火狐、谷歌浏览器中都可以取到session中的值  唯一在变态的360极速浏览器中死活取不到session值

解决方案 »

  1.   

    代码有问题吧,哪有这样的逻辑,如果session中取不到,那么输出,然后还继续取?
      

  2.   

    话说,session依赖cookies的
    再说了,实在不行,通过url回传是杀手锏,就算禁用cookies都不怕
      

  3.   

    对了,别误会,我说的是回传sessionid,具体session值用数据库或者全局map<string,map<>>保存
      

  4.   


    为什么用map<string,map<>>?
      

  5.   


    为什么用map<string,map<>>?
    额~~
    首先,每个访客的session都是Map<K,V>结构的吧,然后,每个访客都有一个sessionid作为索引,那么要存储所有访客的session不就得是map<string,map<>>结构么?String sessionid
    String key
    String value=globalSession.get(sessionid).get(key)