permaculture playing cards*
The moose likes Servlets and the fly likes How to passed a login page with java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to passed a login page with java code" Watch "How to passed a login page with java code" New topic
Author

How to passed a login page with java code

avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
Hey,

I need to download a file from https URL.
The issue is that if I insert the URL to the iexplorer I redirect to the login page.

This url is accessible only after passing the login.

I want to be able to download this file with java code, but in order to do this I need to passed the login page. As I understand I need to have some kind of session here.
I need to do a login and than based on the response try to navigate to the desire URL.

Can any one give me an example or reference to article about it?

Thank you

Ps. I try Google, but I think I didn�t insert the right keywords.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

So... you're trying to protect a resource from being downloaded until after the user has logged in?
Is this right?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
No,

I am the client for this.

I need to write a client in Java that will download the file from this url, but the url is protect by user and password and you are redirect to the login page.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Oh, I see.

Do you actually have a valid username and password?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In any case, since you're writing client code, not servlets, this is not the correct forum for this question.
I'm moving it to our Sockets and Internet Protocols forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to passed a login page with java code
 
Similar Threads
passed! :)
scjp passed
Passed!
Passed
How to passed a login page with java code