Author: woonsan
Date: Wed Sep 10 04:43:19 2014
New Revision: 1623901
URL: http://svn.apache.org/r1623901
Log:
APA-66: default rproxy mapping configuration with localhost example;
parameter renaming (not selector but xpathexpression for htmlcleaner rewriting);
extensibility with HttpClientContext (by overriding
#getHttpClientContextBuilder() when needed)
Added:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/HttpClientContextBuilder.java
Modified:
portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/DefaultProxyProcessingChainBuilder.java
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/ProxyProcessingChainBuilder.java
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/command/ExecuteHttpClientCommand.java
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/filter/SimpleReverseProxyFilter.java
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/portlet.xml
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/rproxy-mappings.yaml
Modified:
portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
(original)
+++
portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/proxy/SimpleReverseProxyPortlet.java
Wed Sep 10 04:43:19 2014
@@ -28,6 +28,7 @@ import org.apache.commons.lang.ArrayUtil
import org.apache.commons.lang.StringUtils;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
+import
org.apache.portals.applications.webcontent2.proxy.HttpClientContextBuilder;
import org.apache.portals.applications.webcontent2.proxy.ProxyMapping;
import org.apache.portals.applications.webcontent2.proxy.ProxyMappingRegistry;
import org.apache.portals.applications.webcontent2.proxy.builder.ProxyServices;
@@ -44,11 +45,12 @@ import org.htmlcleaner.TagNodeVisitor;
public class SimpleReverseProxyPortlet extends GenericReverseProxyPortlet
{
- private static final String CONTENT_SELECTOR_PARAM_NAME =
"content.selector";
+ private static final String XPATH_EXPRESSION_PARAM_NAME =
"xpath.expression";
private static final String HTML_CLEANER_TRANSFORMATION_PARAM_NAME =
"html.cleaner.transformation";
private ProxyMappingRegistry proxyMappingRegistry;
private HttpClientBuilder httpClientBuilder;
+ private HttpClientContextBuilder httpClientContextBuilder;
private ProxyProcessingChain proxyServiceCommand;
public SimpleReverseProxyPortlet()
@@ -61,7 +63,7 @@ public class SimpleReverseProxyPortlet e
{
super.init(portletConfig);
- proxyServiceCommand =
ProxyServices.createDefault().build(getProxyMappingRegistry(),
getHttpClientBuilder());
+ proxyServiceCommand =
ProxyServices.createDefault().build(getProxyMappingRegistry(),
getHttpClientBuilder(), getHttpClientContextBuilder());
ProxyCommandUtils.initializeAllCommands(proxyServiceCommand);
DefaultReverseProxyService proxyService = new
DefaultReverseProxyService(proxyServiceCommand);
@@ -99,6 +101,16 @@ public class SimpleReverseProxyPortlet e
this.httpClientBuilder = httpClientBuilder;
}
+ public HttpClientContextBuilder getHttpClientContextBuilder()
+ {
+ return httpClientContextBuilder;
+ }
+
+ public void setHttpClientContextBuilder(HttpClientContextBuilder
httpClientContextBuilder)
+ {
+ this.httpClientContextBuilder = httpClientContextBuilder;
+ }
+
@Override
public void destroy()
{
@@ -122,7 +134,7 @@ public class SimpleReverseProxyPortlet e
HtmlCleanerContentRewriter contentRewriter = new
HtmlCleanerContentRewriter();
contentRewriter.setSerializerFactory(serializerFactory);
- contentRewriter.setXpathExpression(getContentSelector());
+ contentRewriter.setXpathExpression(getXpathExpression());
contentRewriter.setInnerHtmlOnly(true);
String [] cleanerTransformations =
getCleanerTransformationStringArray();
@@ -147,16 +159,16 @@ public class SimpleReverseProxyPortlet e
return contentRewriters;
}
- protected String getContentSelector()
+ protected String getXpathExpression()
{
- String selector =
getPortletConfig().getInitParameter(CONTENT_SELECTOR_PARAM_NAME);
+ String expression =
getPortletConfig().getInitParameter(XPATH_EXPRESSION_PARAM_NAME);
- if (selector == null || StringUtils.isBlank(selector))
+ if (expression == null || StringUtils.isBlank(expression))
{
- return "body";
+ return "//body";
}
- return selector;
+ return expression;
}
protected String [] getCleanerTransformationStringArray()
Added:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/HttpClientContextBuilder.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/HttpClientContextBuilder.java?rev=1623901&view=auto
==============================================================================
---
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/HttpClientContextBuilder.java
(added)
+++
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/HttpClientContextBuilder.java
Wed Sep 10 04:43:19 2014
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.webcontent2.proxy;
+
+import org.apache.http.client.protocol.HttpClientContext;
+
+public interface HttpClientContextBuilder
+{
+ public HttpClientContext build();
+}
Modified:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/DefaultProxyProcessingChainBuilder.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/DefaultProxyProcessingChainBuilder.java?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/DefaultProxyProcessingChainBuilder.java
(original)
+++
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/DefaultProxyProcessingChainBuilder.java
Wed Sep 10 04:43:19 2014
@@ -17,6 +17,7 @@
package org.apache.portals.applications.webcontent2.proxy.builder;
import org.apache.http.impl.client.HttpClientBuilder;
+import
org.apache.portals.applications.webcontent2.proxy.HttpClientContextBuilder;
import org.apache.portals.applications.webcontent2.proxy.ProxyMappingRegistry;
import
org.apache.portals.applications.webcontent2.proxy.command.AddCookiesToResponseCommand;
import
org.apache.portals.applications.webcontent2.proxy.command.AddHeaderToHttpRequestCommand;
@@ -44,18 +45,18 @@ public class DefaultProxyProcessingChain
super();
}
- public ProxyProcessingChain build(ProxyMappingRegistry
proxyMappingRegistry, HttpClientBuilder httpClientBuilder)
+ public ProxyProcessingChain build(ProxyMappingRegistry
proxyMappingRegistry, HttpClientBuilder httpClientBuilder,
HttpClientContextBuilder httpClientContextBuilder)
{
removeAllCommands();
- addCommand(createDefaultPreprocessingCommand(proxyMappingRegistry,
httpClientBuilder));
- addCommand(createDefaultProcessingCommand(proxyMappingRegistry,
httpClientBuilder));
- addCommand(createDefaultPostprocessingCommand(proxyMappingRegistry,
httpClientBuilder));
+ addCommand(createDefaultPreprocessingCommand(proxyMappingRegistry,
httpClientBuilder, httpClientContextBuilder));
+ addCommand(createDefaultProcessingCommand(proxyMappingRegistry,
httpClientBuilder, httpClientContextBuilder));
+ addCommand(createDefaultPostprocessingCommand(proxyMappingRegistry,
httpClientBuilder, httpClientContextBuilder));
- return super.build(proxyMappingRegistry, httpClientBuilder);
+ return super.build(proxyMappingRegistry, httpClientBuilder,
httpClientContextBuilder);
}
- protected ProxyProcessingChain
createDefaultPreprocessingCommand(ProxyMappingRegistry proxyMappingRegistry,
HttpClientBuilder httpClientBuilder)
+ protected ProxyProcessingChain
createDefaultPreprocessingCommand(ProxyMappingRegistry proxyMappingRegistry,
HttpClientBuilder httpClientBuilder, HttpClientContextBuilder
httpClientContextBuilder)
{
ProxyProcessingChain preprocessingChain = new ProxyProcessingChain();
InitializationCommand initializationCommand = new
InitializationCommand();
@@ -63,7 +64,7 @@ public class DefaultProxyProcessingChain
return preprocessingChain;
}
- protected ProxyProcessingChain
createDefaultProcessingCommand(ProxyMappingRegistry proxyMappingRegistry,
HttpClientBuilder httpClientBuilder)
+ protected ProxyProcessingChain
createDefaultProcessingCommand(ProxyMappingRegistry proxyMappingRegistry,
HttpClientBuilder httpClientBuilder, HttpClientContextBuilder
httpClientContextBuilder)
{
ProxyProcessingChain processingChain = new ProxyProcessingChain();
@@ -79,7 +80,10 @@ public class DefaultProxyProcessingChain
InitHttpRequestCommand initHttpRequestCommand = new
InitHttpRequestCommand();
AddHeaderToHttpRequestCommand addHeaderToHttpRequestCommand = new
AddHeaderToHttpRequestCommand();
+
ExecuteHttpClientCommand executeHttpClientCommand = new
ExecuteHttpClientCommand();
+
executeHttpClientCommand.setHttpClientContextBuilder(httpClientContextBuilder);
+
ResolveContentRewriterCommand resolveContentRewriterCommand = new
ResolveContentRewriterCommand();
AddHeadersToResponseCommand addHeadersToResponseCommand = new
AddHeadersToResponseCommand();
AddCookiesToResponseCommand addCookiesToResponseCommand = new
AddCookiesToResponseCommand();
@@ -104,7 +108,7 @@ public class DefaultProxyProcessingChain
return processingChain;
}
- protected ProxyProcessingChain
createDefaultPostprocessingCommand(ProxyMappingRegistry proxyMappingRegistry,
HttpClientBuilder httpClientBuilder)
+ protected ProxyProcessingChain
createDefaultPostprocessingCommand(ProxyMappingRegistry proxyMappingRegistry,
HttpClientBuilder httpClientBuilder, HttpClientContextBuilder
httpClientContextBuilder)
{
ProxyProcessingChain postprocessingChain = new ProxyProcessingChain();
CleanupCommand cleanupCommand = new CleanupCommand();
Modified:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/ProxyProcessingChainBuilder.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/ProxyProcessingChainBuilder.java?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/ProxyProcessingChainBuilder.java
(original)
+++
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/builder/ProxyProcessingChainBuilder.java
Wed Sep 10 04:43:19 2014
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.commons.chain.Command;
import org.apache.http.impl.client.HttpClientBuilder;
+import
org.apache.portals.applications.webcontent2.proxy.HttpClientContextBuilder;
import org.apache.portals.applications.webcontent2.proxy.ProxyMappingRegistry;
import
org.apache.portals.applications.webcontent2.proxy.impl.ProxyProcessingChain;
@@ -34,7 +35,7 @@ public class ProxyProcessingChainBuilder
{
}
- public ProxyProcessingChain build(ProxyMappingRegistry
proxyMappingRegistry, HttpClientBuilder httpClientBuilder)
+ public ProxyProcessingChain build(ProxyMappingRegistry
proxyMappingRegistry, HttpClientBuilder httpClientBuilder,
HttpClientContextBuilder httpClientContextBuilder)
{
if (chain == null)
{
Modified:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/command/ExecuteHttpClientCommand.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/command/ExecuteHttpClientCommand.java?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/command/ExecuteHttpClientCommand.java
(original)
+++
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/command/ExecuteHttpClientCommand.java
Wed Sep 10 04:43:19 2014
@@ -21,6 +21,7 @@ import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpRequestBase;
+import
org.apache.portals.applications.webcontent2.proxy.HttpClientContextBuilder;
import org.apache.portals.applications.webcontent2.proxy.ReverseProxyException;
import
org.apache.portals.applications.webcontent2.proxy.impl.AbstractProxyCommand;
import org.apache.portals.applications.webcontent2.proxy.impl.ProxyContext;
@@ -29,16 +30,37 @@ import org.apache.portals.applications.w
public class ExecuteHttpClientCommand extends AbstractProxyCommand
{
+ private HttpClientContextBuilder httpClientContextBuilder;
+
@Override
protected boolean executeInternal(final ProxyContext context) throws
ReverseProxyException, IOException
{
HttpRequestBase httpRequest = context.getHttpRequest();
HttpClient httpClient = context.getHttpClient();
- HttpResponse httpResponse = httpClient.execute(httpRequest);
+ HttpResponse httpResponse = null;
+
+ if (getHttpClientContextBuilder() == null)
+ {
+ httpResponse = httpClient.execute(httpRequest);
+ }
+ else
+ {
+ httpResponse = httpClient.execute(httpRequest,
getHttpClientContextBuilder().build());
+ }
+
context.setHttpResponse(httpResponse);
return false;
}
+ public HttpClientContextBuilder getHttpClientContextBuilder()
+ {
+ return httpClientContextBuilder;
+ }
+
+ public void setHttpClientContextBuilder(HttpClientContextBuilder
httpClientContextBuilder)
+ {
+ this.httpClientContextBuilder = httpClientContextBuilder;
+ }
}
Modified:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/filter/SimpleReverseProxyFilter.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/filter/SimpleReverseProxyFilter.java?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/filter/SimpleReverseProxyFilter.java
(original)
+++
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/filter/SimpleReverseProxyFilter.java
Wed Sep 10 04:43:19 2014
@@ -21,6 +21,7 @@ import javax.servlet.ServletException;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
+import
org.apache.portals.applications.webcontent2.proxy.HttpClientContextBuilder;
import org.apache.portals.applications.webcontent2.proxy.ProxyMappingRegistry;
import org.apache.portals.applications.webcontent2.proxy.builder.ProxyServices;
import
org.apache.portals.applications.webcontent2.proxy.impl.DefaultProxyMappingRegistry;
@@ -36,6 +37,7 @@ public class SimpleReverseProxyFilter ex
private ProxyMappingRegistry proxyMappingRegistry;
private HttpClientBuilder httpClientBuilder;
+ private HttpClientContextBuilder httpClientContextBuilder;
private ProxyProcessingChain proxyServiceCommand;
public SimpleReverseProxyFilter()
@@ -48,7 +50,7 @@ public class SimpleReverseProxyFilter ex
{
super.init(filterConfig);
- proxyServiceCommand =
ProxyServices.createDefault().build(getProxyMappingRegistry(),
getHttpClientBuilder());
+ proxyServiceCommand =
ProxyServices.createDefault().build(getProxyMappingRegistry(),
getHttpClientBuilder(), getHttpClientContextBuilder());
ProxyCommandUtils.initializeAllCommands(proxyServiceCommand);
DefaultReverseProxyService proxyService = new
DefaultReverseProxyService(proxyServiceCommand);
@@ -88,6 +90,16 @@ public class SimpleReverseProxyFilter ex
this.httpClientBuilder = httpClientBuilder;
}
+ public HttpClientContextBuilder getHttpClientContextBuilder()
+ {
+ return httpClientContextBuilder;
+ }
+
+ public void setHttpClientContextBuilder(HttpClientContextBuilder
httpClientContextBuilder)
+ {
+ this.httpClientContextBuilder = httpClientContextBuilder;
+ }
+
@Override
public void destroy()
{
Modified:
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
(original)
+++
portals/applications/webcontent/trunk/reverse-proxy/src/main/java/org/apache/portals/applications/webcontent2/proxy/servlet/SimpleReverseProxyServlet.java
Wed Sep 10 04:43:19 2014
@@ -21,6 +21,7 @@ import javax.servlet.ServletException;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
+import
org.apache.portals.applications.webcontent2.proxy.HttpClientContextBuilder;
import org.apache.portals.applications.webcontent2.proxy.ProxyMappingRegistry;
import org.apache.portals.applications.webcontent2.proxy.builder.ProxyServices;
import
org.apache.portals.applications.webcontent2.proxy.impl.DefaultProxyMappingRegistry;
@@ -41,6 +42,7 @@ public class SimpleReverseProxyServlet e
private ProxyMappingRegistry proxyMappingRegistry;
private HttpClientBuilder httpClientBuilder;
+ private HttpClientContextBuilder httpClientContextBuilder;
private ProxyProcessingChain proxyServiceCommand;
public SimpleReverseProxyServlet()
@@ -53,7 +55,7 @@ public class SimpleReverseProxyServlet e
{
super.init(servletConfig);
- proxyServiceCommand =
ProxyServices.createDefault().build(getProxyMappingRegistry(),
getHttpClientBuilder());
+ proxyServiceCommand =
ProxyServices.createDefault().build(getProxyMappingRegistry(),
getHttpClientBuilder(), getHttpClientContextBuilder());
ProxyCommandUtils.initializeAllCommands(proxyServiceCommand);
DefaultReverseProxyService proxyService = new
DefaultReverseProxyService(proxyServiceCommand);
@@ -93,6 +95,16 @@ public class SimpleReverseProxyServlet e
this.httpClientBuilder = httpClientBuilder;
}
+ public HttpClientContextBuilder getHttpClientContextBuilder()
+ {
+ return httpClientContextBuilder;
+ }
+
+ public void setHttpClientContextBuilder(HttpClientContextBuilder
httpClientContextBuilder)
+ {
+ this.httpClientContextBuilder = httpClientContextBuilder;
+ }
+
@Override
public void destroy()
{
Modified:
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/portlet.xml
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/portlet.xml?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/portlet.xml
(original)
+++
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/portlet.xml
Wed Sep 10 04:43:19 2014
@@ -257,7 +257,7 @@
<value>preferences-system-network-proxy.png</value>
</init-param>
<init-param>
- <name>content.selector</name>
+ <name>xpath.expression</name>
<value>//div[@id='bodyColumn']</value>
</init-param>
<expiration-cache>0</expiration-cache>
Modified:
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/rproxy-mappings.yaml
URL:
http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/rproxy-mappings.yaml?rev=1623901&r1=1623900&r2=1623901&view=diff
==============================================================================
---
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/rproxy-mappings.yaml
(original)
+++
portals/applications/webcontent/trunk/war/src/main/webapp/WEB-INF/rproxy-mappings.yaml
Wed Sep 10 04:43:19 2014
@@ -13,6 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+--- !regex
+localPattern: ^/localhost_(\d+)/(.*)$
+remoteReplace: http://localhost:$1/$2
+remotePattern: ^http://localhost:(\d+)/(.*)$
+localReplace: /localhost_$1/$2
+contentRewriters:
+ text/html:
!!org.apache.portals.applications.webcontent2.proxy.rewriter.DefaultReverseProxyTextLineContentRewriter
[]
+
--- !simple
local: /portals/applications/
remote: http://portals.apache.org/applications/