W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 2004

Fwd: Try to Login

From: Grigorios Merenidis <grego501@gmx.net>
Date: Fri, 18 Jun 2004 12:48:58 +0200 (MEST)
To: www-jigsaw@w3.org
Message-ID: <23382.1087555738@www67.gmx.net>

Hi all!

I use the jigsaw api to login into a site.
But if I try to request the server I get 
the following error:

Unable to contact target server www.mercedes-benz.de:80 after 1 tries

My sample code looks like this:

Request request = manager.createRequest();
String postdata=?username=USER&password=PASSWORD&btnSubmit=anmelden";
request.setMethod("POST");
request.setOutputStream(new StringBufferInputStream(postdata));
request.setContentLength(postdata.length());
request.setURL(new URL("http://www.mercedes-benz.de/portal"));
request.setUserAgent(USER_AGENT);
try{
     reply = manager.runRequest(request);
}catch(Exception ex){
		 System.out.println(ex.getMessage());
}

What I am doing wrong?

Thanks for any Help!!

Cheers!

Gregory



-- 
+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
Received on Friday, 18 June 2004 06:49:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:37 GMT