Salve, sto cercando di fare un client che sia in grado di effettuare una connessione ad un sito internet accessibile solamente tramite un login tramite metodo POST, ho scritto questa funzione sulla base di una trovata in rete, alla quale passo una stringa contenente l'indirizzo a cui inviare la richiesta di login ed i dati relativi al login stesso. Il tutto funziona perfettamente, e riesco a loggarmi a tale sito, infatti se guardo la risposta del server al mio post (che salvo come stringa nella variabile page), vedo che mi viene dato il benvenuto sul sito.
codice:
public static boolean loginExecute(String strActionUrl, 
                                    List<NameValuePair> loginNvps)
                                    throws Exception {
        boolean bSuccess = false;

        // Create a new HTTP client and a
        // connection manager
        DefaultHttpClient httpclient = 
                                new DefaultHttpClient();

        
            // The post method is used to request that 
            // the origin server accept the entity enclosed  
            // in the request as a new subordinate of the 
            // resource identified by the Request-URI in 
            // the Request-Line. Essentially this means 
            // that the POST data will be stored by the
            // server and usually will be processed 
            // by a server side application.
            HttpPost httpost = new HttpPost(strActionUrl);

            httpost.setHeader("User-Agent",
                       "Mozilla/5.0 (compatible; MSIE 7.0; 
                                          Windows 2000)");

            httpost.setEntity(
                     new UrlEncodedFormEntity(loginNvps, 
                                              HTTP.UTF_8));

            HttpResponse response = httpclient.execute(httpost);
            HttpEntity = response.getEntity();
            
            HttpEntity resEntity = response.getEntity();
	         if (resEntity != null) {
			String page = EntityUtils.toString(resEntity);
			System.out.println("PAGE :" + page);
                 }

            if (entity != null)
                EntityUtils.consume(entity);
            
            
            // At this point we can handle the connection 
            // as we like. For example we can check out 
            // if procedure was succesful (bSuccess = true), 
            // read the content, download files...

        // return statement
        return bSuccess;
    }
A questo punto però vorrei poter fare altro, aprire altre pagine ad esempio, vorrei sapere come fare, devo fare sempre tramite richieste POST (inviando sempre ad ogni richiesta i miei loginNvps) o d'ora in poi posso semplici richieste GET? Nella parte finale prima del return, nei commenti si dice che adesso è possibile gestire la connessione come si vuole, bene... cosa dovrei mettere a seguito di quel commento se ad esempio volessi accedere ad una nuova pagina?

Grazie.