Hi Jesper,

> I am trying to log in on the website www.nordnet.dk. The website has a
> login-form (with the redirected address
> https://www.nordnet.se/tux/lang/login/login.pl)

That is not a redirect address. It is a target address for the form data.

> PostMethod pm = new PostMethod("http://www.nordnet.dk/";);

Wrong.

> - which returns a "Method failed: HTTP/1.1 405 Method Not Allowed"-error.

Because you are not allowed to use POST on the URL of the main page.

> A little simplified I skip the website-address and access the
> https-login-address directly:

That is not simplified, it is simply correct.

> - and this works fine.
> 
> Why doesn't the first piece of code work?

Because you were sending the data to the main page instead of the
login script. The purpose of the main page is (among others) to
present a login form, not to interpret the data entered there.

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to