?
Solved

httpclient logon automaticly

Posted on 2007-09-30
5
Medium Priority
?
775 Views
Last Modified: 2012-05-05
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...
0
Comment
Question by:komputer
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 19989148
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
 

Author Comment

by:komputer
ID: 19989252
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
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 410 total points
ID: 19989265
Its form based authentication. Look at "Working with forms" section here http://httpunit.sourceforge.net/doc/cookbook.html
0
 
LVL 92

Expert Comment

by:objects
ID: 19989273
> could you send code please?

see the  link i postedabove
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question