I was just wondering if it is possible to use multiple java.net.CookieHandler
in one application. The only way to use a CookieHandler
, I found, is by using the following:
public static void setDefault(CookieHandler cHandler)
I my case, I want to login multiple times into the same site and so I need more then one CookieHandler
.
- Do I understand this right?
- Is there a way to use a
CookieHandler
not on a global level?
Unfortunately HttpURLConnection
doesn't provide such a function like .useCookieHandler(cHandler)
.