Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.servlet
Class ProxyServlet.Transparent

    java.lang.Object
      org.mortbay.servlet.ProxyServlet
          org.mortbay.servlet.ProxyServlet.Transparent

All Implemented Interfaces:
  javax.servlet.Servlet

Enclosing class:
  ProxyServlet

    public static class ProxyServlet.Transparent

extends ProxyServlet

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.servlet.ProxyServlet
`ProxyServlet.Transparent`

Field Summary

Fields inherited from class org.mortbay.servlet.ProxyServlet
`_config, _context, _DontProxyHeaders`

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

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

Methods inherited from class org.mortbay.servlet.ProxyServlet
`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

### ProxyServlet.Transparent

    public ProxyServlet.Transparent()

### ProxyServlet.Transparent

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

### proxyHttpURL

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

  Description copied from class: `ProxyServlet`
  Resolve requested URL to the Proxied URL

  Overrides:
    `proxyHttpURL` in class `ProxyServlet`
  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 URL to which the request should be proxied.
  Throws:
    `java.net.MalformedURLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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