多线程问题



  class TestThrean  implements Runnable{

  @Override
  public void run() {
   
   ActionContext actx = ActionContext.getContext();
   HttpServletRequest hrequest = (HttpServletRequest) actx.get(ServletActionContext.HTTP_REQUEST);
   
   String pageRetUrl=hrequest.getSession().getAttribute("pageRetUrl").toString();
   System.out.println(pageRetUrl);
         System.out.println("11111111111111111111111111111111111111111111111");
         System.out.println("11111111111111111111111111111111111111111111111");
        
    
   
   //return "payOk";
  }
     
    }
    class MyThread  implements Runnable{
     public void run() {
       ActionContext actx = ActionContext.getContext();
          HttpServletRequest hrequest = (HttpServletRequest) actx.get(ServletActionContext.HTTP_REQUEST);
           String bgRetUrl=hrequest.getSession().getAttribute("bgRetUrl").toString();
           System.out.println(bgRetUrl);
           System.out.println("0000000000000000000000000000000000000000000000000");
           System.out.println("0000000000000000000000000000000000000000000000000");
     }
    }
    public void pageTest () {
   
    TestThrean tt = new  TestThrean();
        MyThread  m=new  MyThread();
         Thread t = new Thread(tt);
         Thread t2 = new Thread(m);
         t.start();
         t2.start();
        
  
    }

你可能感兴趣的:(多线程)