Author: jaz
Date: Fri Jul 25 11:43:45 2008
New Revision: 679876
URL:
http://svn.apache.org/viewvc?rev=679876&view=revLog:
added flag to disable the cached classloader; conflicts with certain libraries which plug into the servlet container (i.e. JSF)
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=679876&r1=679875&r2=679876&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 Fri Jul 25 11:43:45 2008
@@ -117,7 +117,10 @@
// ----- Servlet Object Setup -----
// set the cached class loader for more speedy running in this thread
- Thread.currentThread().setContextClassLoader(localCachedClassLoader);
+ String disableCachedClassloader = config.getInitParameter("disableCachedClassloader");
+ if (disableCachedClassloader == null || !"Y".equalsIgnoreCase(disableCachedClassloader)) {
+ Thread.currentThread().setContextClassLoader(localCachedClassLoader);
+ }
// set the webSiteId in the session
httpRequest.getSession().setAttribute("webSiteId", config.getServletContext().getAttribute("webSiteId"));
@@ -150,7 +153,7 @@
// ----- Context Security -----
// check if we are disabled
String disableSecurity = config.getInitParameter("disableContextSecurity");
- if (disableSecurity != null && "Y".equals(disableSecurity)) {
+ if (disableSecurity != null && "Y".equalsIgnoreCase(disableSecurity)) {
chain.doFilter(request, response);
return;
}