Index: project.xml =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/project.xml,v retrieving revision 1.29 diff -u -r1.29 project.xml --- project.xml 25 Feb 2003 02:10:16 -0000 1.29 +++ project.xml 2 May 2003 23:28:35 -0000 @@ -97,7 +97,7 @@ - Ortwin Gl�ck + Ortwin Gl�ck oglueck oglueck@apache.org Nose Applied Intelligence AG @@ -144,7 +144,7 @@ - Armando Ant�n + Armando Ant�n armando.anton@newknow.com @@ -196,40 +196,6 @@ 1.0.2 http://jakarta.apache.org/commons/logging.html - - jsse - 1.0.3_01 - http://java.sun.com/products/jsse/ - - - jsse+jnet - 1.0.3_01 - http://java.sun.com/products/jsse/ - jnet-1.0.3_01.jar - - - jsse+jcert - 1.0.3_01 - http://java.sun.com/products/jsse/ - jcert-1.0.3_01.jar - - - jce - 1.2.2 - http://java.sun.com/products/jce/ - - - jce+sunjce_provider - 1.2.2 - http://java.sun.com/products/jce/ - sunjce_provider-1.2.2.jar - - - jce+local_policy - 1.2.2 - http://java.sun.com/products/jce/ - local_policy-1.2.2.jar - Index: src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java,v retrieving revision 1.15 diff -u -r1.15 MultiThreadedHttpConnectionManager.java --- src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java 27 Apr 2003 19:43:41 -0000 1.15 +++ src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java 2 May 2003 23:28:38 -0000 @@ -88,6 +88,8 @@ * @author Mike Bowler * @author Carl A. Dunham * + * @see http://jakarta.apache.org/commons/httpclient/threading.html + * * @since 2.0 */ public class MultiThreadedHttpConnectionManager implements HttpConnectionManager { @@ -117,7 +119,7 @@ private ReferenceQueue referenceQueue; /** - * No-args constructor + * No-arg constructor */ public MultiThreadedHttpConnectionManager() { @@ -344,7 +346,7 @@ } /** - * Make the given HttpConnection available for use by other requests. + * Makes the given HttpConnection available for use by other requests. * If another thread is blocked in getConnection() that could use this * connection, it will be woken up. * Index: xdocs/applications.xml =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/xdocs/applications.xml,v retrieving revision 1.12 diff -u -r1.12 applications.xml --- xdocs/applications.xml 6 Apr 2003 18:57:52 -0000 1.12 +++ xdocs/applications.xml 2 May 2003 23:28:39 -0000 @@ -93,7 +93,7 @@
de4d2c
de4d2c - development environment 4 documents 2 content - - is an in-browser web page wrapper develeopment system that returns + is an in-browser web page wrapper development system that returns it's extraction result as XML using XSLT generated from intuitive user input. Commons HttpClient is used as the robust base of the whole system.
@@ -104,6 +104,20 @@ Each web site resource can be then tested against one of the pre-packaged tests from Furies or you can easily write your own. + +
Term Highlighting for Verity Ultraseek search results
+
+ Reflexe Technologies has developed a servlet-based application that works + with Verity Ultraseek, formerly known as Inktomi + Enterprise Search, that highlights terms that match search query, by + intercepting HTTP communication between the browser and the original + document server. It can highlight terms in HTML documents, as well as Word, + Excel, Powerpoint, and Acrobat PDF documents, and uses the Jakarta + HttpClient for better performance than that provided by the standard J2SE + platform, and in particular because it must be able to offer NTLM + authentification when required. +
+ Index: xdocs/authentication.xml =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/xdocs/authentication.xml,v retrieving revision 1.3 diff -u -r1.3 authentication.xml --- xdocs/authentication.xml 10 Mar 2003 04:49:22 -0000 1.3 +++ xdocs/authentication.xml 2 May 2003 23:28:39 -0000 @@ -37,9 +37,11 @@

Preemptive authentication can be enabled within HttpClient. In this mode HttpClient will send the basic authentication response even before the server gives an unauthorized response in certain situations, thus reducing the overhead - of making the connection. To enable this use the following:

+ of making the connection. This can be enabled globally using:

- setSystemProperty(Authenticator.PREEMPTIVE_PROPERTY, "true"); + System.setProperty(Authenticator.PREEMPTIVE_PROPERTY, "true"); +

Or on each individual method with:

+ someMethod.setDoAuthentication(true);

The preemptive authentication conforms to rfc2617:

Index: xdocs/features.xml =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/xdocs/features.xml,v retrieving revision 1.9 diff -u -r1.9 features.xml --- xdocs/features.xml 8 Feb 2003 01:41:49 -0000 1.9 +++ xdocs/features.xml 2 May 2003 23:28:40 -0000 @@ -23,12 +23,21 @@
  • Transparent connections through HTTP proxies.
  • +
  • Tunneled HTTPS connections through HTTP proxies, via the CONNECT method. +
  • +
  • Transparent connections through SOCKS proxies (version 4 & 5) using native Java + socket support. +
  • Authentication using Basic, Digest and the encrypting NTLM (NT Lan Manager) methods.
  • Multi-Part form POST for uploading large files.
  • Pluggable secure sockets implementations, making it easier to use third party solutions
  • +
  • Connection management support for use in multi-threaded applications. Supports setting the + maximum total connections as well as the maximum connections per host. Detects and closes + stale connections. +
  • Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them back out in a Cookie: header when appropriate.
  • @@ -88,10 +97,14 @@ client side implementations written in Java. The jdk has the HttpUrlConnection which is limited and in many ways flawed. This is one reason why Jakarta, and others free and commercial vendors, have implemented independant HTTP clients. - One of those commercial vendors, nogoop, has a fair - product comparison - to help you choose the right solution. -

    + To help you choose the right solution, one of those commercial vendors, nogoop, has a fair + product comparison, + noting the following recent additions to HttpClient: +
      +
    • NTLM Authentication
    • +
    • idle connection timeout
    • +
    +

    Index: xdocs/navigation.xml =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/xdocs/navigation.xml,v retrieving revision 1.5 diff -u -r1.5 navigation.xml --- xdocs/navigation.xml 10 Mar 2003 04:08:06 -0000 1.5 +++ xdocs/navigation.xml 2 May 2003 23:28:40 -0000 @@ -23,6 +23,7 @@ + Index: xdocs/threading.xml =================================================================== RCS file: xdocs/threading.xml diff -N xdocs/threading.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xdocs/threading.xml 2 May 2003 23:28:40 -0000 @@ -0,0 +1,91 @@ + + + + + Threading + Michael Becke + $Id: $ + + + +
    +

    This document provides an overview of how to use HttpClient safely from within a + multi-threaded environment. It is broken down into the following main sections:

    + +

    Please see the MultiThreadedExample + for a concrete example.

    +
    + +
    +

    The main reason for using multiple theads in HttpClient is to allow the + execution of multiple methods at once (Downloading the latest builds of HttpClient and + Tomcat for example). During execution each method uses an instance of an HttpConnection. + Since connections can only be safely used from a single thread and method at a time and + that they are a finite resource, a class is needed to ensure that connections are properly used. + This job goes to the MultiThreadedHttpConnectionManager.

    +

    To get started one must create an instance of the MultiThreadedHttpConnectionManager + and give it to an HttpClient. This looks something like:

    + +

    This instance of HttpClient can now be used to execute multiple methods from multiple + threads. Each subsequent call to HttpClient.executeMethod() will go to the connection + manager and ask for an instance of HttpConnection. This connection will be checked out + to the method and as a result it must also be returned. More on this below in Connection Release.

    + + +

    The MultiThreadedHttpConnectionManager supports the following options for + customizing the number of active connections:

    + + + + + + + + + +
    maxConnectionsPerHostThe maximum number of connections that will be created for any particular + HostConfiguration. Defaults to 2.
    maxTotalConnectionsThe maximum number of active connections. Defaults to 20.
    +

    In general the connection manager makes an attempt to reuse connections + for a particular host. Connection are reclaimed using a least recently + used approach.

    +
    +
    + +
    +

    One main side effect of connection management is that connections must + be manually released when no longer used. This is due to the fact + that HttpClient cannot determine when a method is no longer using its connection. + In particular a method's response body is not handled within the context of + HttpClient, but when the response is read it must make use of the method's + connection. Thus, a connection cannot be released from a method until the method's + response body is read or until explicitly released. To safely ensure + connection release HttpClient should be used in the following manner:

    + + +
    + +