Unable to move on to next page http://indianvisa-bangladesh.nic.in/visa/Get_Appointment via httpClient 4.4 <p>Hiii Update 2: thanks 4 the help. I got the cookies now but i am stuck on the same page. I added cookie as header with request but i got the same page as response. Don't know i m doing wrong. Please guide me.</p> <pre><code>org.apache.http.impl.client.AbstractHttpClient httpclient = new org.apache.http.impl.client.DefaultHttpClient(); try { // Create a local instance of cookie store CookieStore cookieStore = new BasicCookieStore(); // Create local HTTP context HttpContext localContext = new BasicHttpContext(); // Bind custom cookie store to the local context System.out.println("Binding Cookie from Cookie Store="+this.cookies); String c=this.cookies.replaceAll("Set-Cookie: ", ""); String c1=c.replaceAll(";path=/", ""); System.out.println("c="+c1); String []ar=c1.split("="); System.out.println("a[0]="+ar[0]); System.out.println("a[1]="+ar[1]); BasicClientCookie cookie = new BasicClientCookie(ar[0], ar[1]); cookie.setDomain("indianvisa-bangladesh.nic.in"); cookie.setPath("/"); cookieStore.addCookie(cookie); httpclient.setCookieStore(cookieStore); localContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore); HttpGet httpget = new HttpGet("http://indianvisa-bangladesh.nic.in/visa/Get_Appointment"); System.out.println("executing request " + httpget.getURI()); // Pass local context as a parameter HttpResponse response = httpclient.execute(httpget, localContext); HttpEntity entity = response.getEntity(); System.out.println("----------------------------------------"); System.out.println(response.getStatusLine()); if (entity != null) { System.out.println("Response content length: " + entity.getContentLength()); } List&lt;Cookie&gt; cookies = cookieStore.getCookies(); for (int i = 0; i &lt; cookies.size(); i++) { System.out.println("Local cookie: " + cookies.get(i)); } BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent())); StringBuffer result = new StringBuffer(); String line = ""; while ((line = rd.readLine()) != null) { result.append(line); } System.out.println("Page contect="+result); // Consume response content EntityUtils.consume(entity); System.out.println("----------------------------------------"); } finally { // When HttpClient instance is no longer needed, // shut down the connection manager to ensure // immediate deallocation of all system resources //httpclient.getConnectionManager().shutdown(); } </code></pre>