hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "barber barber" <bar...@poesia.zzn.com>
Subject Something is wrong with my hhttpclient
Date Wed, 26 Jan 2005 08:20:50 GMT
Hello,
 
 I,m a new user of httpclient. I,m trying to make login to my application web by httpclient:
 
  HttpClient httpClient = new HttpClient();
 
         try {
             PostMethod method  = new PostMethod("http://dirIp:9080/url/login.jsp");
 
             method.addParameter("user","xxx");
             method.addParameter("password","xxx");
            
 
 
             httpClient.executeMethod(method);
 
             String body = method.getResponseBodyAsString();
 
             System.out.println(body);
             method .releaseConnection();
 
         } catch (IOException e) {
             e.printStackTrace();  //To change body of catch statement use Options | File
Templates.
         }
 
 
 It works, but when print then body, i get the code of the "login.jsp" and i want the code
of the reedirected page, which must be the "error login page" or the "ini application page".
I think it,s not making submit. 
 
 And another question if i have more than one form how i especify which one is submitted?
 
 I wait for your answer 
 Thanks very much for your time!! ;)
 


Obtenga su E-mail GRATUITO en http://poesia.zzn.com
____________________________________________________________
Para obtener su propio servicio de correo electrónico basado en la Multimalla, diríjase
a http://www.zzn.com

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message