## org.mortbay.proxy
Class AsyncProxyServlet.Transparent

    java.lang.Object
      org.mortbay.proxy.AsyncProxyServlet
          org.mortbay.proxy.AsyncProxyServlet.Transparent

All Implemented Interfaces:
  javax.servlet.Servlet

Enclosing class:
  AsyncProxyServlet

    public static class AsyncProxyServlet.Transparent

extends AsyncProxyServlet

Transparent Proxy. This convenience extension to AsyncProxyServlet configures the servlet as a transparent proxy. The servlet is configured with init parameter:

- ProxyTo - a URI like http://host:80/context to which the request is proxied.
- Prefix - a URI prefix that is striped from the start of the forwarded URI.

For example, if a request was received at /foo/bar and the ProxyTo was http://host:80/context and the Prefix was /foo, then the request would be proxied to http://host:80/context/bar

Nested Class Summary

Nested classes/interfaces inherited from class org.mortbay.proxy.AsyncProxyServlet
`AsyncProxyServlet.Transparent`

Field Summary

Fields inherited from class org.mortbay.proxy.AsyncProxyServlet
`_DontProxyHeaders`

Constructor Summary
`AsyncProxyServlet.Transparent()`
`AsyncProxyServlet.Transparent(java.lang.String prefix, java.lang.String server, int port)`

Method Summary
`void` `init(javax.servlet.ServletConfig config)`
`protected HttpURI` `proxyHttpURI(java.lang.String scheme, java.lang.String serverName, int serverPort, java.lang.String uri)` /** Resolve requested URL to the Proxied HttpURI

Methods inherited from class org.mortbay.proxy.AsyncProxyServlet
`destroy, getServletConfig, getServletInfo, handleConnect, service`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AsyncProxyServlet.Transparent

    public AsyncProxyServlet.Transparent()

### AsyncProxyServlet.Transparent

    public AsyncProxyServlet.Transparent(java.lang.String prefix,
                                         java.lang.String server,
                                         int port)

Method Detail

### init

    public void init(javax.servlet.ServletConfig config)
              throws javax.servlet.ServletException

  Specified by:
    `init` in interface `javax.servlet.Servlet`
  Overrides:
    `init` in class `AsyncProxyServlet`
  Throws:
    `javax.servlet.ServletException`

### proxyHttpURI

    protected HttpURI proxyHttpURI(java.lang.String scheme,
                                   java.lang.String serverName,
                                   int serverPort,
                                   java.lang.String uri)
                            throws java.net.MalformedURLException

  Description copied from class: `AsyncProxyServlet`
  /** Resolve requested URL to the Proxied HttpURI

  Overrides:
    `proxyHttpURI` in class `AsyncProxyServlet`
  Parameters:
    `scheme` - The scheme of the received request.
    `serverName` - The server encoded in the received request(which may be from an absolute URL in the request line).
    `serverPort` - The server port of the received request (which may be from an absolute URL in the request line).
    `uri` - The URI of the received request.
  Returns:
    The HttpURI to which the request should be proxied.
  Throws:
    `java.net.MalformedURLException`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.