You are viewing a plain text version of this content. The canonical link for it is here.
Posted to portalapps-dev@portals.apache.org by wo...@apache.org on 2009/10/02 17:59:54 UTC
svn commit: r821069 - in /portals/applications/webcontent/trunk:
webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/portlet/
webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/proxy/impl/
webcontent-war/src/mai...
Author: woonsan
Date: Fri Oct 2 15:59:54 2009
New Revision: 821069
URL: http://svn.apache.org/viewvc?rev=821069&view=rev
Log:
APA-17: Cleaning reverseproxy.properties and changes on setting iframe portlet's title by overriding getTitle() of GenericPortlet.
Modified:
portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/portlet/IFrameGenericPortlet.java
portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/proxy/impl/DefaultHttpReverseProxyServlet.java
portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/conf/reverseproxy.properties
Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/portlet/IFrameGenericPortlet.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/portlet/IFrameGenericPortlet.java?rev=821069&r1=821068&r2=821069&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/portlet/IFrameGenericPortlet.java (original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/portlet/IFrameGenericPortlet.java Fri Oct 2 15:59:54 2009
@@ -172,7 +172,6 @@
@Override
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
- setTitleByPreferences(request, response);
String viewPage = (String) request.getAttribute(PARAM_VIEW_PAGE);
if (viewPage != null)
@@ -219,7 +218,6 @@
@Override
public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
- setTitleByPreferences(request, response);
response.setContentType("text/html");
doPreferencesEdit(request, response);
}
@@ -227,14 +225,12 @@
@Override
public void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
- setTitleByPreferences(request, response);
super.doHelp(request, response);
}
@Override
public void doCustom(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
- setTitleByPreferences(request, response);
super.doCustom(request, response);
}
@@ -405,14 +401,19 @@
}
}
- protected void setTitleByPreferences(RenderRequest request, RenderResponse response)
+ @Override
+ protected String getTitle(RenderRequest request)
{
String title = getAttributePreference(request.getPreferences(), "TITLE");
if (!StringUtils.isEmpty(title))
{
- response.setTitle(title);
+ return title;
+ }
+ else
+ {
+ return super.getTitle(request);
}
}
-
+
}
Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/proxy/impl/DefaultHttpReverseProxyServlet.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/proxy/impl/DefaultHttpReverseProxyServlet.java?rev=821069&r1=821068&r2=821069&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/proxy/impl/DefaultHttpReverseProxyServlet.java (original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/proxy/impl/DefaultHttpReverseProxyServlet.java Fri Oct 2 15:59:54 2009
@@ -163,6 +163,11 @@
String localBasePath = pathPassConf.getString("local");
String remoteBaseURL = pathPassConf.getString("remote");
+ if (StringUtils.isBlank(localBasePath) || StringUtils.isBlank(remoteBaseURL))
+ {
+ log.error("Wrong configuration for pass mapping of " + pathName + ". local={}, remove={}.", localBasePath, remoteBaseURL);
+ }
+
try
{
HttpReverseProxyPathMapper proxyPathMapper =
Modified: portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/conf/reverseproxy.properties
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/conf/reverseproxy.properties?rev=821069&r1=821068&r2=821069&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/conf/reverseproxy.properties (original)
+++ portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/conf/reverseproxy.properties Fri Oct 2 15:59:54 2009
@@ -43,16 +43,13 @@
# HTTP Connection parameters per route.
# ... If you don't specify here for a route, then the default values are applied.
# ... Put the route item names here.
-proxy.http.route = apache, portals, somewhere
+proxy.http.route = apache, somewhere
proxy.http.route.param.defaultMaxPerRoute = 20
# ... Sets detail attirbutes for each route item.
proxy.http.route.apache.target.hostname = www.apache.org
-proxy.http.route.apache.maxConnections = 10
-
-proxy.http.route.portals.target.hostname = portals.apache.org
-proxy.http.route.portals.maxConnections = 40
+proxy.http.route.apache.maxConnections = 40
# ... 'somewhere' is just an example to show the full configurable items...
proxy.http.route.somewhere.target.hostname = somewhere.localhost.com
@@ -71,7 +68,7 @@
# Proxy Pass Reverse Mapping configurations for each category
# ... Put the path item names here. Each path item will be evaluated by the order.
-proxy.reverse.pass = apache, portals, localhost, somewhere
+proxy.reverse.pass = apache, localhost, somewhere
# ... Sets detail attributes for each path item.
@@ -81,7 +78,7 @@
proxy.reverse.pass.apache.rewriter.parserAdaptor = html
# ... SimpleLinkRewritingParserAaptor rewrites links only based on its remote base URLs,
# ... while PassMappingLinkRewritingParserAaptor rewrites links based on all reverse proxy pass mappings.
-#proxy.reverse.pass.portals.rewriter.parserAdaptor.html = org.apache.portals.applications.webcontent.proxy.impl.SimpleLinkRewritingParserAaptor
+#proxy.reverse.pass.apache.rewriter.parserAdaptor.html = org.apache.portals.applications.webcontent.proxy.impl.SimpleLinkRewritingParserAaptor
proxy.reverse.pass.apache.rewriter.parserAdaptor.html = org.apache.portals.applications.webcontent.proxy.impl.PassMappingLinkRewritingParserAaptor
proxy.reverse.pass.apache.rewriter.parserAdaptor.html.mimeType = text/html