Asynchronous Proxy Servlet
The Jetty release contains an Asychronous Proxy Servlet that may be used either as a traditional web proxy (configured in a browser) or as a transparent proxy to forward requests from a jetty server to any other server.
If the Asynchronous Proxy Servlet is configured as the default servlet at the '/' path of the root context, then browsers can be configured to use the jetty server as a proxy server. The Proxy servlet will detect the proxy requests from the absolute URL in the request line and forward the request to the real server.
A transparent proxy can proxy normal HTTP requests to another server without any special cooperation from the client.
A derived AsynchronousProxyServlet should be configured in web.xml to match the paths that are to be proxied. The AsynchronousProxyServlet itself should be extended to implement the
HttpURI proxyHttpURI(final String scheme, final String serverName, int serverPort, final String uri) method to return the URI destination to which a specific request will be proxied.
The derived AsynchronousProxyServlet.Trasparent subclass exists to perform standard transparent proxy operation. Currently this class needs to be programmaticly instantiated. Future releases will allow this to be configured with init parameters.