cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1298830 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Date Fri, 09 Mar 2012 14:01:18 GMT
Author: sergeyb
Date: Fri Mar  9 14:01:18 2012
New Revision: 1298830

URL: http://svn.apache.org/viewvc?rev=1298830&view=rev
Log:
[CXF-4171,CXF-3743] Fixing property name typo and adding an option to set the static sub resolution
in CXFNonSpringJaxrsServlet

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java?rev=1298830&r1=1298829&r2=1298830&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Fri Mar  9 14:01:18 2012
@@ -64,8 +64,9 @@ public class CXFNonSpringJaxrsServlet ex
     private static final String SERVICE_SCOPE_PARAM = "jaxrs.scope";
     private static final String EXTENSIONS_PARAM = "jaxrs.extensions";
     private static final String LANGUAGES_PARAM = "jaxrs.languages";
-    private static final String PROPERTIES_PARAM = "jaxrs.languages";
+    private static final String PROPERTIES_PARAM = "jaxrs.properties";
     private static final String SCHEMAS_PARAM = "jaxrs.schemaLocations";
+    private static final String STATIC_SUB_RESOLUTION_PARAM = "jaxrs.static.subresources";
     private static final String SERVICE_SCOPE_SINGLETON = "singleton";
     private static final String SERVICE_SCOPE_REQUEST = "prototype";
     
@@ -110,10 +111,18 @@ public class CXFNonSpringJaxrsServlet ex
             bean.setResourceProvider(entry.getKey(), entry.getValue());
         }
         setExtensions(bean, servletConfig);
+        setStaticSubResolution(bean, servletConfig);
         
         bean.create();
     }
 
+    protected void setStaticSubResolution(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
{
+        String param = servletConfig.getInitParameter(STATIC_SUB_RESOLUTION_PARAM);
+        if (param != null) {
+            bean.setStaticSubresourceResolution(Boolean.valueOf(param.trim()));
+        }
+    }
+    
     protected void setExtensions(JAXRSServerFactoryBean bean, ServletConfig servletConfig)
{
         bean.setExtensionMappings(handleMapSequence(servletConfig.getInitParameter(EXTENSIONS_PARAM)));
         bean.setLanguageMappings(handleMapSequence(servletConfig.getInitParameter(LANGUAGES_PARAM)));
@@ -352,6 +361,7 @@ public class CXFNonSpringJaxrsServlet ex
         setAllInterceptors(bean, servletConfig);
         setExtensions(bean, servletConfig);
         setSchemasLocations(bean, servletConfig);
+        setStaticSubResolution(bean, servletConfig);
         bean.setBus(getBus());
         bean.create();
     }



Mime
View raw message