the shiroi

Greenhorn
+ Follow
since Mar 30, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by the shiroi

Hi,
Also i observed that the response code(HttpURLConnectionObject.getResponseCode()) returned is not 3xx when there exists a redirection (as stated in the J2SE docs.). For example www.viviance.com (redirected to http://www.viviance.com/viviance_home/index.jsp) or www.icope.com (redirected to www.icope.com/icope/) or www.dw.org (redirected to www.dwelle.de/), strange that rCode returned is 200 and not 3xx. Any idea over this would be of great help!
shiroi.

[This message has been edited by the shiroi (edited April 04, 2001).]
22 years ago
Hai, Back again. Yes, you are rigt Maha, in all cases we get the same url that we use while creating the con obj. I tried with all the keys in the getHeaderField() but in some cases (for ex. try connecting to http://www.contakt.net or http://www.icope.com) you get the redirected url with key int = 2 i.e, under the sub heading Content-Location. But then this is not the same in all cases, there has to be a way!
Shiroi.
22 years ago
Thanks maha. But it dose not help me, as the redirection would be done by webservers (any webserver), I am just trying to make a urlconnection to a webserver and if at all I am redirected, how can I get the redirected url?
Thanks once again.
shiroi.
22 years ago
Hi,
Is there anyway to find the URL of a webpage if you were
redirected?
For example, a valid URL would be http://www.vvvvvvv.com. When
I do a url.openConnection(), I am able to get the inputstream to
a web page. However, this is really a page located at http://www.vvvvvvvv.com/xxxx_home/index.jsp Is there a way of
finding out this URL from my initial URL connection?
shiroi
22 years ago