这儿有一段话,解释比较详细:The sessions are linked to the client. If you start IE and then use 
Ctrl-N to open a new window in the same process, it will share the same 
session. You can check if a new process is started by using Windows' 
task manager, and check how many instances if IEXPLORE you have in the list.However, if you start IE and then again by double-clicking on the IE 
icon on your desktop, for example, then you will have two separate 
processes, and the sessions won't be shared.excerpt from: http://www.velocityreviews.com/forums/t363555-session-being-kept-from-brower-to-browser.html

解决方案 »

  1.   

    两个session,在session中用到了Cookie,用一个IE访问一个站点就会创建一个cookie,直到session失效(一般30分钟)或关闭ie,一个会话才算结束。
      

  2.   


    理解session机制
    session机制是一种服务器端的机制,服务器使用一种类似于散列表的结构(也可能就是使用散列表)来保存信息。当程序需要为某个客户端的请求创建一个session的时候,服务器首先检查这个客户端的请求里是否已包含了一个session标识 - 称为 session id,如果已包含一个session id则说明以前已经为此客户端创建过session,服务器就按照session id把这个 session检索出来使用(如果检索不到,可能会新建一个),如果客户端请求不包含session id,则为此客户端创建一个session并且生成一个与此session相关联的session id,session id的值应该是一个既不会重复,又不容易被找到规律以仿造的字符串,这个 session id将被在本次响应中返回给客户端保存。保存这个session id的方式可以采用cookie,这样在交互过程中浏览器可以自动的按照规则把这个标识发挥给服务器。一般这个cookie的名字都是类似于SEEESIONID,而。比如weblogic对于web应用程序生成的cookie,JSESSIONID= ByOK3vjFD75aPnrF7C2HmdnV6QZcEbzWoWiBYEnLerjQ99zWpBng!-145788764,它的名字就是 JSESSIONID。更多请参考:http://www.idosoft.com.cn/techgather/12.html
      

  3.   

    原来这个和进程也有关系啊!
    再问一个问题
    public class CompleteServlet extends HttpServlet implements Servlet { private static int count = 0;
    private static Cookie cookie = null;

    /**
    * @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    */
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException {
    testCookie(req, resp);
    //testRequest(req, resp); }
    public void testCookie(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException {
    if (cookie == null) {
    //Create a Cookie
    cookie = new Cookie("mycookie", "j2ee");
    //set age
    cookie.setMaxAge(60*2);
    //use the Cookie
    resp.addCookie(cookie);
    } else {
    /*test cookie*/
    //Obtain all cookies
    Cookie[] cookies = req.getCookies();
    //display mycookie
    /*Generate Dynamic Content*/
    resp.setStatus(HttpServletResponse.SC_OK);
    resp.setContentType("text/html");
    PrintWriter out = resp.getWriter();
    out.println(
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD "
    + "HTML 4.0 Transitional//EN\">");
    out.println("<HTML><HEAD><TITLE>Complete Servlet</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<H1>The following information are about Cookies</H1>");
    //prevent dead cookie 
    if (cookies != null) {
    for (int i = 0; i < cookies.length; i++) {
    String cookieName = cookies[i].getName();
    out.println("<br>" + cookieName);
    if (cookieName.equals("mycookie")) {
    out.println("<br>mycookie is " + cookies[i].getValue());
    }
    }
    } else {
    out.println("cookies have been destroyed");
    }
    out.println("</BODY></HTML>");
    }
    }
    /**
    * @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    */
    }
    第一次访问CompleteServlet时,打开一个IE浏览器会收到一个cookie,第二次访问时就会显示出如下效果:
    mycookie 
    mycookie is j2ee 
    两分钟之后再次访问
    出现如下结果:
    cookies have been destroyed 
    这是我双击打开另一个IE浏览器,输入URL访问CompleteServlet,结果还是:
    cookies have been destroyed 
    我搞不懂了,这是为什么?既然两次打开浏览器是两次session,那为什么双击打开另一个IE浏览器却找不到cookie呢?
    调试运行,发现第二次打开浏览器的时候,确实会进入cookie==null中,运行cookie=new Cookie,可是却找不到,这又是为什么呢?请大家帮帮忙了!!
      

  4.   


    这样只有1个session。
    自己可以试验的,首先启动IE(我的是IE7),打开CSDN,登录。然后,新建一个空标签页,打开CSDN,你会发现你已经登录啦,所以,这2个页面是共享同一个SESSION的。希望下面的2篇文章能帮助你理解SESSION:
    http://www.builder.com.cn/2007/0728/438360.shtml
    http://baike.baidu.com/view/25258.htm
      

  5.   

    两个session
    开两次浏览器就相当于建立了两个会话,也就是两个session啦.
    这两个session的id是不同的,楼主可以打印下就知道啦.
      

  6.   

    这个就要看具体的网站了!~!
    比如:CSDN就是同一个Session
    但是有的网站还可以同时打开几个浏览器同时登录!~!
    你看看这个网页吧,真的还不错
    http://www.builder.com.cn/2007/0728/438360.shtml 
      

  7.   

    两个session  两次会话了
      

  8.   

    IE7打开两个标签算一个session,
    打开两个ie7算两个session
      

  9.   

    是一个session,如果你要打开两种不同的浏览器,就会有两个session,比如说一个ie一个firefox,那样你可以在一个机器上登陆两个csdn的账号,如果都是ie或firefox的话,你只能登陆一个
      

  10.   

    你找开两个浏览器是两个session就像在内存中开了两个地方虽然访问的都是一个网站可是这两个地方的
    数据是不一样的