jdk/src/share/classes/java/net/doc-files/net-properties.html
author ohair
Wed, 06 Apr 2011 22:06:11 -0700
changeset 9035 1255eb81cc2f
parent 7982 65f5328a67a2
child 14775 2ed01c760aea
permissions -rw-r--r--
7033660: Update copyright year to 2011 on any files changed in 2011 Reviewed-by: dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
<!--
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 7982
diff changeset
     2
 Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3855
diff changeset
     7
 published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3855
diff changeset
     9
 by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3855
diff changeset
    21
 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3855
diff changeset
    22
 or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3855
diff changeset
    23
 questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
-->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
<HTML>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
<HEAD>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
	<TITLE>Networking Properties</TITLE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
</HEAD>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
<BODY LANG="en-US" DIR="LTR">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
<H1 ALIGN=CENTER>Networking Properties</H1>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
<P ALIGN=LEFT>There are a few standard system properties used to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
alter the mechanisms and behavior of the various classes of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
java.net package. Some are checked only once at startup of the VM,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
and therefore are best set using the -D option of the java command,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
while others have a more dynamic nature and can also be changed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
the <a href="../../lang/System.html#setProperty(java.lang.String, java.lang.String)">System.setProperty()</a> API. The purpose of this document is to list
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
and detail all of these properties.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
<P>If there is no special note, a property value is checked every time it is used.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
<a name="Ipv4IPv6"></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
<H2>IPv4 / IPv6</H2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
	<LI><P><B>java.net.preferIPv4Stack</B> (default: false)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
	If IPv6 is available on the operating system the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
	underlying native socket will be, by default, an IPv6 socket which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
	lets applications connect to, and accept connections from, both
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
	IPv4 and IPv6 hosts. However, in the case an application would
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
	rather use IPv4 only sockets, then this property can be set to <B>true</B>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
	The implication is that it will not be possible for the application
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
	to communicate with IPv6 only hosts.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
	<LI><P><B>java.net.preferIPv6Addresses</B> (default: false)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
	When dealing with a host which has both IPv4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
	and IPv6 addresses, and if IPv6 is available on the operating
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
	system, the default behavior is to prefer using IPv4 addresses over
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
	IPv6 ones. This is to ensure backward compatibility, for example
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
	applications that depend on the representation of an IPv4 address
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
	(e.g. 192.168.1.1). This property can be set to <B>true</B> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
	change that preference and use IPv6 addresses over IPv4 ones where
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
	possible.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
<P>Both of these properties are checked only once, at startup.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
<a name="Proxies"></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
<H2>Proxies</H2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
<P>A proxy server allows indirect connection to network services and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
is used mainly for security (to get through firewalls) and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
performance reasons (proxies often do provide caching mechanisms).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
The following properties allow for configuration of the various type
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
of proxies.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
	<LI><P>HTTP</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
	<P>The following proxy settings are used by the HTTP protocol handler.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
	<UL>
3855
653df3a7256d 6737819: sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
jccollet
parents: 2
diff changeset
    74
		<LI><P><B>http.proxyHost</B> (default: &lt;none&gt;)<BR>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
	        The hostname, or address, of the proxy server 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
		</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
		<LI><P><B>http.proxyPort</B> (default: 80)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
	        The port number of the proxy server.</P>
3855
653df3a7256d 6737819: sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
jccollet
parents: 2
diff changeset
    79
		<LI><P><B>http.nonProxyHosts</B> (default:  localhost|127.*|[::1])<BR>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
	        Indicates the hosts that should be accessed without going
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
	        through the proxy. Typically this defines internal hosts.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
	        The value of this property is a list of hosts,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
		separated by the '|' character. In addition the wildcard
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
	        character '*' can be used for pattern matching. For example
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
		<code>-Dhttp.nonProxyHosts=&rdquo;*.foo.com|localhost&rdquo;</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
		will indicate that every hosts in the foo.com domain and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
		localhost should be accessed directly even if a proxy server is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
		specified.</P>
3855
653df3a7256d 6737819: sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
jccollet
parents: 2
diff changeset
    89
                <P>The default value excludes all common variations of the loopback address.</P>
653df3a7256d 6737819: sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
jccollet
parents: 2
diff changeset
    90
        </UL>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
	<LI><P>HTTPS<BR>This is HTTP over SSL, a secure version of HTTP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
	mainly used when confidentiality (like on payment sites) is needed.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
	<P>The following proxy settings are used by the HTTPS protocol handler.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
	<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
		<LI><P><B>https.proxyHost</B>(default: &lt;none&gt;)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
	        The hostname, or address, of the proxy server 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
		</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
		<LI><P><B>https.proxyPort</B> (default: 443)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
	        The port number of the proxy server.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
		<P>The HTTPS protocol handler will use the same nonProxyHosts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
		property as the HTTP protocol.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
	<LI><P>FTP</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
	<P>The following proxy settings are used by the FTP protocol handler.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
	<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
		<LI><P><B>ftp.proxyHost</B>(default: &lt;none&gt;)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
	        The hostname, or address, of the proxy server 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
		</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
		<LI><P><B>ftp.proxyPort</B> (default: 80)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
	        The port number of the proxy server.</P>
3855
653df3a7256d 6737819: sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
jccollet
parents: 2
diff changeset
   111
		<LI><P><B>ftp.nonProxyHosts</B> (default: localhost|127.*|[::1])<BR>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
	        Indicates the hosts that should be accessed without going
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
	        through the proxy. Typically this defines internal hosts.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
	        The value of this property is a list of hosts, separated by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
	        the '|' character. In addition the wildcard character
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
		'*' can be used for pattern matching. For example
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
		<code>-Dhttp.nonProxyHosts=&rdquo;*.foo.com|localhost&rdquo;</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
		will indicate that every hosts in the foo.com domain and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
		localhost should be accessed directly even if a proxy server is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
		specified.</P>
3855
653df3a7256d 6737819: sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
jccollet
parents: 2
diff changeset
   121
                <P>The default value excludes all common variations of the loopback address.</P>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
	</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
	<LI><P>SOCKS<BR>This is another type of proxy. It allows for lower
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
	level type of tunneling since it works at the TCP level. In effect,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
	in the Java(tm) platform setting a SOCKS proxy server will result in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
	all TCP connections to go through that proxy, unless other proxies
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
	are specified. If SOCKS is supported by a Java SE implementation, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
	following properties will be used:</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
	<UL>
7982
65f5328a67a2 6964547: Impossible to set useV4 in SocksSocketImpl
chegar
parents: 5506
diff changeset
   130
		<LI><P><B>socksProxyHost</B> (default: &lt;none&gt;)<BR>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
	        The hostname, or address, of the proxy server.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
		<LI><P><B>socksProxyPort</B> (default: 1080)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
	        The port number of the proxy server.</P>
7982
65f5328a67a2 6964547: Impossible to set useV4 in SocksSocketImpl
chegar
parents: 5506
diff changeset
   134
                <LI><P><B>socksProxyVersion</B> (default: 5)<BR>
65f5328a67a2 6964547: Impossible to set useV4 in SocksSocketImpl
chegar
parents: 5506
diff changeset
   135
                The version of the SOCKS protocol supported by the server. The
65f5328a67a2 6964547: Impossible to set useV4 in SocksSocketImpl
chegar
parents: 5506
diff changeset
   136
                default is <code>5</code> indicating SOCKS V5, alternatively
65f5328a67a2 6964547: Impossible to set useV4 in SocksSocketImpl
chegar
parents: 5506
diff changeset
   137
                <code>4</code> can be specified for SOCKS V4. Setting the property
65f5328a67a2 6964547: Impossible to set useV4 in SocksSocketImpl
chegar
parents: 5506
diff changeset
   138
                to values other than these leads to unspecified behavior.</P>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
		<LI><P><B>java.net.socks.username</B> (default: &lt;none&gt;)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
	        Username to use if the SOCKSv5 server asks for authentication
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
	        and no java.net.Authenticator instance was found.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
		<LI><P><B>java.net.socks.password</B> (default: &lt;none&gt;)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
	        Password to use if the SOCKSv5 server asks for authentication
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
	        and no java.net.Authenticator instance was found.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
		<P>Note that if no authentication is provided with either the above
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
		properties or an Authenticator, and the proxy requires one, then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
		the <B>user.name</B> property will be used with no password.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
	</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
	<LI><P><B>java.net.useSystemProxies</B> (default: false)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
	On recent Windows systems and on Gnome 2.x systems it is possible to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
	tell the java.net stack, setting this property to <B>true</B>, to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
	the system proxy settings (both	these systems let you set proxies
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
	globally through their user interface). Note that this property is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
	checked only once at startup.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
<a name="MiscHTTP"></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
<H2>Misc HTTP properties</H2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
	<LI><P><B>http.agent</B> (default: &ldquo;Java/&lt;version&gt;&rdquo;)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
	Defines the string sent in the User-Agent request header in http
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
	requests. Note that the string &ldquo;Java/&lt;version&gt;&rdquo; will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
	be appended to the one provided in the property (e.g. if 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
	-Dhttp.agent=&rdquo;foobar&rdquo; is used, the User-Agent header will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
	contain &ldquo;foobar Java/1.5.0&rdquo; if the version of the VM is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
	1.5.0). This property is checked only once at startup.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
	<LI><P><B>http.keepalive</B> (default: true)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
	Indicates if persistent connections should be supported. They improve
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
	performance by allowing the underlying socket connection to be reused
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
	for multiple http requests. If this is set to true then persistent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
	connections will be requested with HTTP 1.1 servers.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
	<LI><P><B>http.maxConnections</B> (default: 5)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
	If HTTP keepalive is enabled (see above) this value determines the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
	maximum number of idle connections that will be simultaneously kept
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
	alive, per destination.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
	<LI><P><B>http.maxRedirects</B> (default: 20)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
	This integer value determines the maximum number, for a given request,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
	of HTTP redirects that will be automatically followed by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
	protocol handler.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
	<LI><P><B>http.auth.digest.validateServer</B> (default: false)</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
	<LI><P><B>http.auth.digest.validateProxy</B> (default: false)</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
	<LI><P><B>http.auth.digest.cnonceRepeat</B> (default: 5)</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
	<P>These 3 properties modify the behavior of the HTTP digest
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
	authentication mechanism. Digest authentication provides a limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
	ability for the server  to authenticate itself to the client (i.e.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
	By proving it knows the user's password). However not all HTTP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
	servers support this capability and by default it is turned off. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
	first two properties can be set to true to enforce this check for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
	authentication with either an origin or proxy server, respectively.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
	<P>It is usually not necessary to change the third property. It
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
	determines how many times a cnonce value is re-used. This can be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
	useful when the MD5-sess algorithm is being used. Increasing this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	value reduces the computational overhead on both client and server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
	by reducing the amount of material that has to be hashed for each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
	HTTP request.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
	<LI><P><B>http.auth.ntlm.domain</B> (default: &lt;none&gt;)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
	NTLM is another authentication scheme. It uses the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
	java.net.Authenticator class to acquire usernames and passwords when
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
	they are needed. However NTLM also needs the NT domain name. There are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
	3 options for specifying that domain:</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
	<OL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
	  <LI><P>Do not specify it. In some environments the domain is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
	      actually not required and the application does not have to specify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
	      it.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
	  <LI><P>The domain name can be encoded within the username by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
	      prefixing the domain name, followed by a back-slash '\' before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
	      username. With this method existing applications that use the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
	      authenticator class do not need to be modified, as long as users
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
	      are made aware that this notation must be used.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
	  <LI><P>If a domain name is not specified as in method 2) and these
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
	      property is defined, then its value will be used a the domain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
	      name.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
	</OL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
<P>All these properties are checked only once at startup.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
<a name="AddressCache"></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
<H2>Address Cache</H2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
<P>The java.net package, when doing name resolution, uses an address
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
cache for both security and performance reasons. Any address
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
resolution attempt, be it forward (name to IP address) or reverse (IP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
address to name), will have its result cached, whether it was
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
successful or not, so that subsequent identical requests will not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
have to access the naming service. These properties allow for some
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
tuning on how the cache is operating.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
	<LI><P><B>networkaddress.cache.ttl</B> (default: see below)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
	Value is an integer corresponding to the number of seconds successful
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
	name lookups will be kept in the cache. A value of -1, or any  other
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
	negative value for that matter,	indicates a &ldquo;cache forever&rdquo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
	policy, while a value of 0 (zero) means no caching. The default value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
	is -1 (forever) if a security manager is installed, and implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
	specific when no security manager is installed.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
	<LI><P><B>networkaddress.cache.negative.ttl</B>	(default: 10)<BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
	Value is an integer corresponding to the number of seconds an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
	unsuccessful name lookup will be kept in the cache. A value of -1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
	or any negative value, means &ldquo;cache forever&rdquo;, while a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
	value of 0 (zero) means no caching.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
<P>Since these 2 properties are part of the security policy, they are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
not set by either the -D option or the System.setProperty() API,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
instead they are set in the JRE security policy file <code>lib/security/java.security</code>.</P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
</BODY>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
</HTML>