What protocols are supported by the URL and URLConnection classes?

Tim Rohaly

The protocols supported by URL and URLConnection are VM-specific. Sun's JDK supports a different set than the browser VMs or third-party JDK VMs. The protocols that seem to be common to all implementations are HTTP and FTP and file. Other protocols that might be supported include HTTPS, mailto, gopher, and TELNET.

In the table below, some of the more common VMs are listed showing the major protocols they support. There are other protocols not shown in this table that may be supported.

JDK 1.2Netscape 4.7IE 5.0
* JDK 1.2 supports HTTPS only when the JSSE extension is installed

If a protocol is not supported in your VM, you can extend the functionality of the URL class by writing and installing your own protocol handler.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact