W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1997

Re: Handling of redirections

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Tue, 27 May 1997 17:54:26 +0200 (MET DST)
Message-Id: <199705271554.RAA15996@www43.inria.fr>
To: mark@intraspect.com
Cc: www-jigsaw@w3.org
Mark Friedman writes:
 > I see. I guess I was just using the wrong API (I was using HTTPManager).
 > So if I had a URL hanging around what would be the best/easiest way to
 > get that URL and have redirection done automatically? Perhaps, another
 > way of phrasing the question is: how can I get access to the
 > HttpURLConnection API? Its constructor isn't public, so I assume that
 > there is some other, public, way to make use of it.

Run your your java app with:
java -Djava.protocol.packages=w3c.www.protocol

Them just do the usual code:
URLConnection c = url.openConnection();
c is now an instance opf w3c.www.protocol.http.HttpURLConnection (you
can even cast it, but you shouldn't need to)

btw I cant remember the exact name of the property check the java
sources if it doesn't work ;-)
Received on Tuesday, 27 May 1997 11:55:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:31 UTC