That's a lot of code for doing a login. If you're planning to code real interactions with the web site I'd recommend to switch to a library like jWebUnit (or HtmlUnit, on which jWebUnit is based). That would make the task a lot easier.
If you want to stick with HttpClient, tells in more detail what "it fails at the login" means - where (and how) does the code deviate from what you expected to happen?
I have worked on same application as you do have. Doing login in https site and then using other pages within the site. I have achieved the fuctionality using apache http client library using session management. Look more on session management with http client library, It will surely solve your problem.
Narendra Shah -- SCJP 5
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop