Code example for BasicClientCookie

Methods: setDomainsetVersion

0
	// version:0, name: PHPSESSID, value:~~, domain:host, path: /, expiry: null 
 
	//only call when host has been set 
	public void setCookieStore(String sessionid)
	{ 
		BasicClientCookie sessionCookie = new BasicClientCookie("PHPSESSID", sessionid);
		sessionCookie.setDomain(host);
		//are all these necessary? 
		sessionCookie.setVersion(0);
		KolCookieStore = new BasicCookieStore();
		KolCookieStore.addCookie(sessionCookie);
	} 
	 
	public String processLoginPage() throws Exception
	{ 
		DefaultHttpClient httpclient = new DefaultHttpClient();
		host = "http://www.kingdomofloathing.com";
		HttpContext localContext = new BasicHttpContext();
		ResponseHandler<String> responseHandler = new BasicResponseHandler();
		HttpGet httpget = new HttpGet(host);
Connect your IDE to all the code out there  Get Codota for Java