org.eclipse.jetty.servlets
Class ProxyServlet.Transparent
java.lang.Object
org.eclipse.jetty.servlets.ProxyServlet
org.eclipse.jetty.servlets.ProxyServlet.Transparent
- All Implemented Interfaces:
- 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
init
public void init(ServletConfig config)
throws ServletException
- Specified by:
init
in interface Servlet
- Overrides:
init
in class ProxyServlet
- Throws:
ServletException
proxyHttpURI
protected HttpURI proxyHttpURI(String scheme,
String serverName,
int serverPort,
String uri)
throws MalformedURLException
- Overrides:
proxyHttpURI
in class ProxyServlet
- Throws:
MalformedURLException
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.