Uploaded image for project: 'ZATS'
  1. ZATS
  2. ZATS-13

when the same client connects to different page, session doesn't keep.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • 1.0.0
    • Mimic
    • None

      whne the same client connects to different page, session doesn't keep. Add the following test case can reproduce this problem.

      	@Test
      	public void testSameSession(){
      		DefaultZatsEnvironment ctx = new DefaultZatsEnvironment();
      		try{
      			ctx.init("./src/test/resources/web");
      			Client c =  ctx.newClient();
      			DesktopAgent desktop1 = c.connect("/basic/click.zul");
      			DesktopAgent desktop2 = c.connect("/basic/click.zul");
      			assertNotSame(desktop1.getId(), desktop2.getId());
      			assertEquals(((HttpSession)((Desktop)desktop1.getDelegatee()).getSession().getNativeSession()).getId(),
      					((HttpSession)((Desktop)desktop2.getDelegatee()).getSession().getNativeSession()).getId());
      		}finally{
      			ctx.destroy();
      		}
      	}	
      

      cause:
      EmulatorClient.connect() doesn't append cookie.

            paowang paowang
            hawk hawk
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: