Look at the examples again. Specifically example 3.7, where setCookieStore is used. You'll note that the httpClient variable is declared with the type DefaultHttpClient (on the left hand side). Your code below is not doing this (you're assigning to a variable of type HttpClient, which is an interface that doesn't have the setCookieStore method).
So you should change your code to use: DefaultHttpClient httpClient = new DefaultHttpClient(); Thanks, Sam On 17 April 2012 11:01, tommmmmm <[email protected]> wrote: > On 17 April 2012 11:56, Sam Crawford <[email protected]> wrote: > >> It is there... I suspect you may not be using the DefaultHttpClient >> class. This has methods for both setCookieStore and getCookieStore. >> I've just checked the source for 4.1.3, it's certainly there. >> >> > HttpClient httpClient = new DefaultHttpClient(); > > and I've printed my classpath just to be 100% sure - there is this line: > > - > > jar:file:/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/httpclient-4.1.3.jar > > > I also tried typing the method manually in case Netbeans just doesn't see > it. Got compilation error symbol not found, so getCookieStore really isn't > there. > > I also tried calling getCookieStore as a static method > HttpClient.getCookieStore(). Also didn't work. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
