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
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)
|
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(java.lang.String prefix,
java.lang.String host,
int port)
ProxyServlet.Transparent
public ProxyServlet.Transparent(java.lang.String prefix,
java.lang.String schema,
java.lang.String host,
int port,
java.lang.String path)
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(java.lang.String scheme,
java.lang.String serverName,
int serverPort,
java.lang.String uri)
throws java.net.MalformedURLException
- Overrides:
proxyHttpURI
in class ProxyServlet
- Throws:
java.net.MalformedURLException
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.