org.eclipse.jetty.servlets

## Class ProxyServlet.Transparent

- java.lang.Object
- - org.eclipse.jetty.servlets.ProxyServlet
  - - org.eclipse.jetty.servlets.ProxyServlet.Transparent

- All Implemented Interfaces:
    javax.servlet.Servlet
  Enclosing class:
    ProxyServlet

      public static class ProxyServlet.Transparent
      extends ProxyServlet

  Transparent Proxy. This convenience extension to ProxyServlet configures the servlet as a transparent proxy. The servlet is configured with init parameters:
  - 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.eclipse.jetty.servlets.ProxyServlet

      `ProxyServlet.Transparent`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.jetty.servlets.ProxyServlet

      `_black, _client, _config, _context, _DontProxyHeaders, _hostHeader, _log, _white`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyServlet.Transparent()`
    `ProxyServlet.Transparent(String prefix, String host, int port)`
    `ProxyServlet.Transparent(String prefix, String schema, String host, int port, String path)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `init(javax.servlet.ServletConfig config)`
    `protected HttpURI` | `proxyHttpURI(String scheme, String serverName, int serverPort, String uri)`

    - ### Methods inherited from class org.eclipse.jetty.servlets.ProxyServlet

      `createHttpClient, createHttpClientInstance, createLogger, customizeContinuation, customizeExchange, destroy, filterResponseHeaderValue, getHostHeader, getServletConfig, getServletInfo, handleConnect, handleOnConnectionFailed, handleOnException, handleOnExpire, proxyHttpURI, service, setHostHeader, validateDestination`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProxyServlet.Transparent

          public ProxyServlet.Transparent()

    - #### ProxyServlet.Transparent

          public ProxyServlet.Transparent(String prefix,
                                  String host,
                                  int port)

    - #### ProxyServlet.Transparent

          public ProxyServlet.Transparent(String prefix,
                                  String schema,
                                  String host,
                                  int port,
                                  String path)

  - ### 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 `ProxyServlet`
      Throws:
        `javax.servlet.ServletException`

    - #### proxyHttpURI

          protected HttpURI proxyHttpURI(String scheme,
                             String serverName,
                             int serverPort,
                             String uri)
                                  throws MalformedURLException

      Overrides:
        `proxyHttpURI` in class `ProxyServlet`
      Throws:
        `MalformedURLException`

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