SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(httpsScheme);
DefaultHttpClient httpClient = new DefaultHttpClient(new PoolingClientConnectionManager(schemeRegistry));
MechanizeAgent agent = new MechanizeAgent();
Cookie cookie2 = agent.cookies().addNewCookie("gpw_e24", ".", "oracle.com");
cookie2.getHttpCookie().setPath("/");
cookie2.getHttpCookie().setSecure(false);