tags:

views:

18

answers:

1

Hello. If I create 2 WebClients in different threads, how do I make them use the same cookies?

+1  A: 

You can use the below code:

CookieManager cookieManager = new CookieManager();
webClient1.setCookieManager(cookieManager);
webClient2.setCookieManager(cookieManager);
Ahmed Ashour