The HttpURLConnection class also has two static methods that affect how all URLConnection objects interact with web servers. With a true argument, the HttpURLConnection.setFollowRedirects(boolean followRedirects) method says that connections will follow redirect instructions from the web server. Untrusted applets are not allowed to set this. The boolean method HttpURLConnection.getFollowRedirects() returns true if redirect requests are honored, false if they're not.

Previous slide Next slide Back to first slide View graphic version