TOC PREV NEXT INDEX




HTTP Examples


HTTP Browser Example

The HTTP browser example (MyBrowser.java) demonstrates authentication, cookie management, and proxy management. The example files are:

http/MyBrowser.java

http/AuthenticationValidator.java

http/CookieValidator.java

http/ProxyValidator.java
 
Authentication

This example has support for HTTP authentication. It has an additional window called AuthenticationValidator. When an authentication is sent to the server that requires it, the authentication is displayed in this window.

For example, if authentication is required for a certain site, the Requires Authentication window is displayed, requesting the user's name and password. When the user clicks OK, the authentication is displayed in the AuthenticationValidator window. The user can click Save to avoid having to enter their name and password again. The user also can remove authentications from the list.

Cookie Management

Cookie management is built in to the HTTP browser example. An additional window, called CookieValidator, allows the user to save, load, and remove cookies.

Proxy Management

This example has support for proxies. The window called ProxyValidator allows the user to add a global proxy and specific proxies for specified domains. These proxies can be saved, loaded, and removed.

PAC Browser Example

The PAC browser example (pac/PACBrowser.java) demonstrates the ICEbrowser HTTP PAC (Proxy Auto-Configuration) functionality specified by Netscape. For more information on PAC, see: http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html

Before trying this example, modify the proxy.pac file as needed and move it to the desired location. Update the location in the source code as well:

PacManager pacManager =

    new PacManager(new URL("file:///e:/proxy.pac"));
 

After you make these modifications, you can start the PAC browser example. The browser pops up the appropriate query dialogs as follows:



Copyright 2005. ICEsoft Technologies, Inc.
http://www.icesoft.com

TOC PREV NEXT INDEX