You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2011/02/22 13:48:36 UTC
svn commit: r1073318 - in /cxf/branches/2.3.x-fixes/rt/transports:
http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
Author: ningjiang
Date: Tue Feb 22 12:48:36 2011
New Revision: 1073318
URL: http://svn.apache.org/viewvc?rev=1073318&view=rev
Log:
CXF-3355 Exporting the properties of OSGi transport Servlet for configuring by the OSGi admin services
Modified:
cxf/branches/2.3.x-fixes/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
Modified: cxf/branches/2.3.x-fixes/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml?rev=1073318&r1=1073317&r2=1073318&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml (original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http-osgi/src/main/resources/META-INF/spring/cxf-transport-osgi.xml Tue Feb 22 12:48:36 2011
@@ -31,6 +31,14 @@ http://www.springframework.org/schema/co
<osgix:cm-properties id="cxfOsgiProperties" persistent-id="org.apache.cxf.osgi">
<prop key="org.apache.cxf.servlet.context">/cxf</prop>
<prop key="org.apache.cxf.servlet.name">cxf-osgi-transport-servlet</prop>
+ <prop key="org.apache.cxf.servlet.hide-service-list-page">false</prop>
+ <prop key="org.apache.cxf.servlet.disable-address-updates">false</prop>
+ <prop key="org.apache.cxf.servlet.base-address"></prop>
+ <prop key="org.apache.cxf.servlet.service-list-path"></prop>
+ <prop key="org.apache.cxf.servlet.static-resources-list"></prop>
+ <prop key="org.apache.cxf.servlet.redirects-list"></prop>
+ <prop key="org.apache.cxf.servlet.redirect-servlet-name"></prop>
+ <prop key="org.apache.cxf.servlet.redirect-servlet-path"></prop>
</osgix:cm-properties>
<ctx:property-placeholder properties-ref="cxfOsgiProperties"/>
@@ -45,6 +53,14 @@ http://www.springframework.org/schema/co
<osgi:service-properties>
<entry key="alias" value="${org.apache.cxf.servlet.context}" />
<entry key="servlet-name" value="${org.apache.cxf.servlet.name}"/>
+ <entry key="hide-service-list-page" value="${org.apache.cxf.servlet.hide-service-list-page}"/>
+ <entry key="disable-address-updates" value="${org.apache.cxf.servlet.disable-address-updates}"/>
+ <entry key="base-address" value="${org.apache.cxf.servlet.base-address}"/>
+ <entry key="service-list-path" value="${org.apache.cxf.servlet.service-list-path}"/>
+ <entry key="static-resources-list" value="${org.apache.cxf.servlet.static-resources-list}"/>
+ <entry key="redirects-list" value="${org.apache.cxf.servlet.redirects-list}"/>
+ <entry key="redirect-servlet-name" value="${org.apache.cxf.servlet.redirect-servlet-name}"/>
+ <entry key="redirect-servlet-path" value="${org.apache.cxf.servlet.redirect-servlet-path}"/>
</osgi:service-properties>
</osgi:service>
Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java?rev=1073318&r1=1073317&r2=1073318&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java (original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractServletController.java Tue Feb 22 12:48:36 2011
@@ -22,6 +22,7 @@ package org.apache.cxf.transport.servlet
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;
+import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.common.util.UrlUtils;
public abstract class AbstractServletController {
@@ -69,27 +70,27 @@ public abstract class AbstractServletCon
}
String hideServiceList = servletConfig.getInitParameter("hide-service-list-page");
- if (hideServiceList != null) {
+ if (!StringUtils.isEmpty(hideServiceList)) {
isHideServiceList = Boolean.valueOf(hideServiceList);
}
String isDisableAddressUpdates = servletConfig.getInitParameter("disable-address-updates");
- if (isDisableAddressUpdates != null) {
+ if (!StringUtils.isEmpty(isDisableAddressUpdates)) {
disableAddressUpdates = Boolean.valueOf(isDisableAddressUpdates);
}
String isForcedBaseAddress = servletConfig.getInitParameter("base-address");
- if (isForcedBaseAddress != null) {
+ if (!StringUtils.isEmpty(isForcedBaseAddress)) {
forcedBaseAddress = isForcedBaseAddress;
}
String serviceListTransform = servletConfig.getInitParameter("service-list-stylesheet");
- if (serviceListTransform != null) {
+ if (!StringUtils.isEmpty(serviceListTransform)) {
serviceListStyleSheet = serviceListTransform;
}
String serviceListPath = servletConfig.getInitParameter("service-list-path");
- if (serviceListPath != null) {
+ if (!StringUtils.isEmpty(serviceListPath)) {
serviceListRelativePath = serviceListPath;
}
String configTitle = servletConfig.getInitParameter("service-list-title");
- if (configTitle != null) {
+ if (!StringUtils.isEmpty(configTitle)) {
title = configTitle;
}
}