You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/06/03 21:10:52 UTC

svn commit: r951119 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java

Author: jleroux
Date: Thu Jun  3 19:10:52 2010
New Revision: 951119

URL: http://svn.apache.org/viewvc?rev=951119&view=rev
Log:
A patch from Sascha Rodekamp "Set webside Id in context filter" (https://issues.apache.org/jira/browse/OFBIZ-3801) - OFBIZ-3801

Very minor: a better way to write the webSiteId in the Session. 

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=951119&r1=951118&r2=951119&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Thu Jun  3 19:10:52 2010
@@ -62,6 +62,7 @@ import org.ofbiz.security.authz.Authoriz
 import org.ofbiz.security.authz.AuthorizationFactory;
 import org.ofbiz.service.GenericDispatcher;
 import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.webapp.website.WebSiteWorker;
 
 /**
  * ContextFilter - Restricts access to raw files and configures servlet objects.
@@ -134,7 +135,7 @@ public class ContextFilter implements Fi
         }
 
         // set the webSiteId in the session
-        httpRequest.getSession().setAttribute("webSiteId", config.getServletContext().getAttribute("webSiteId"));
+        httpRequest.getSession().setAttribute("webSiteId", WebSiteWorker.getWebSiteId(httpRequest));
 
         // set the ServletContext in the request for future use
         request.setAttribute("servletContext", config.getServletContext());