When using a URLConnection, how do I send a user name and password to access a password-protected URL?

Tim Rohaly

There are two articles on the JavaWorld site which address this question in detail. The first, http://www.javaworld.com/javaworld/javatips/jw-javatip46.html, shows a solution using the Authenticator class available in Java 2. The second, http://www.javaworld.com/javaworld/javatips/jw-javatip47.html, provides a solution which can run under JDK 1.1.

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






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



About | Sitemap | Contact