svn commit: r1796382 - in /ofbiz/ofbiz-plugins/trunk/cmssite: src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java webapp/cmssite/WEB-INF/web.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1796382 - in /ofbiz/ofbiz-plugins/trunk/cmssite: src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java webapp/cmssite/WEB-INF/web.xml

Deepak Dixit-5
Author: deepak
Date: Sat May 27 11:42:27 2017
New Revision: 1796382

URL: http://svn.apache.org/viewvc?rev=1796382&view=rev
Log:
Fixed:  After the implementation of new servlet filter for controller related logic, the multisite feature was not working properly due to URL modification. This control filter can not be applied to cmssite because that web application is intended to use dynamically publish URL. So we can remove the control filter from web.xml of cmssite.
  Thanks Jacopo Cappellato for discussing the possible solution on this issue. (OFBIZ-7120)
 
 Thanks Mohammed Rehan Khan for your contribution.

Modified:
    ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java
    ofbiz/ofbiz-plugins/trunk/cmssite/webapp/cmssite/WEB-INF/web.xml

Modified: ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java?rev=1796382&r1=1796381&r2=1796382&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java (original)
+++ ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java Sat May 27 11:42:27 2017
@@ -80,7 +80,7 @@ public class WebSiteFilter implements Fi
 
         GenericValue webSite = null;
         try {
-            if (UtilValidate.isNotEmpty(webSiteAlias) && webSite != null) {
+            if (UtilValidate.isNotEmpty(webSiteAlias) && webSite == null) {
                 webSite = EntityQuery.use(delegator).from("WebSite").where("hostedPathAlias", webSiteAlias).cache().queryFirst();
             }
             if (UtilValidate.isEmpty(webSite)) {

Modified: ofbiz/ofbiz-plugins/trunk/cmssite/webapp/cmssite/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/cmssite/webapp/cmssite/WEB-INF/web.xml?rev=1796382&r1=1796381&r2=1796382&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/cmssite/webapp/cmssite/WEB-INF/web.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/cmssite/webapp/cmssite/WEB-INF/web.xml Sat May 27 11:42:27 2017
@@ -40,19 +40,6 @@ under the License.
     </context-param>
 
     <filter>
-        <display-name>ControlFilter</display-name>
-        <filter-name>ControlFilter</filter-name>
-        <filter-class>org.apache.ofbiz.webapp.control.ControlFilter</filter-class>
-        <init-param>
-            <param-name>allowedPaths</param-name>
-            <param-value>/cms:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images</param-value>
-        </init-param>
-        <init-param>
-            <param-name>redirectPath</param-name>
-            <param-value>/cms</param-value>
-        </init-param>
-    </filter>
-    <filter>
         <display-name>ContextFilter</display-name>
         <filter-name>ContextFilter</filter-name>
         <filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
@@ -63,10 +50,6 @@ under the License.
         <filter-class>org.apache.ofbiz.cmssite.multisite.WebSiteFilter</filter-class>
     </filter>
     <filter-mapping>
-        <filter-name>ControlFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
         <filter-name>ContextFilter</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>