Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I find the URL of the redirected webpage?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I am accessing a web page using java.net.URL class. But that page redirects to some other page. How can I find URL of the redirected page?

for eg:
I wanted to access this page
Let us suppose this page redirects to
page.

I get the InputStream of the redirected page.
How can I find the URL of redirected ( i.e. login.htm ) page?

Is there any method to find this ? Please help me?

Thanks in advance,
V.Thandava Krishna.
 
I don't know the URL class, but the first thing that comes to mind is if it doesn't have something to do that, you could always parse through the html to see where it redirects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top