httpclient logon automaticly

hi,

i have to download a file from a url in my application but before this, the site requires me to logon. how i can accomplish these steps in java with apache httpclient.

thanks...
komputerAsked:
Who is Participating?
 
Ajay-SinghCommented:
Its form based authentication. Look at "Working with forms" section here http://httpunit.sourceforge.net/doc/cookbook.html
0
 
Ajay-SinghCommented:
Depends on kind of authentication site needs -
If the authentication is HTTP authentication, you can set the
Basic/Digest/NTLM credentials appropriately.
 
Otherwise, you should use form filling approach (checkout this library:
http://httpunit.sourceforge.net/)
0
 
komputerAuthor Commented:
i do not know what kind of authontication that needs and how i can know?
the page i want to go: http://imeidb.gsm.org/imei/reports/SystemGeneratedReports.jsp

btw: i would like to use apache http client.

could you send code please?

0
 
objectsCommented:
> could you send code please?

see the  link i postedabove
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.