Parent Directory | Revision Log | Patch
--- cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java 2005/04/22 11:01:43 164218 +++ cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java 2005/04/22 11:03:32 164219 @@ -104,11 +104,6 @@ public class CocoonServlet extends HttpS */ protected Exception exception; - /** - * Avalon application context - */ - protected org.apache.avalon.framework.context.Context appContext; - private String containerEncoding; protected ServletContext servletContext; @@ -140,6 +135,8 @@ public class CocoonServlet extends HttpS /** The logger */ protected Logger log; + protected Context environmentContext; + /** * Initialize this <code>CocoonServlet</code> instance. You will * notice that I have broken the init into sub methods to make it @@ -211,7 +208,7 @@ public class CocoonServlet extends HttpS try { this.coreUtil = new CoreUtil(env); - this.appContext = coreUtil.getCore().getContext(); + this.environmentContext = env.getEnvironmentContext(); this.log = env.logger; } catch (Exception e) { if ( e instanceof ServletException ) { @@ -577,7 +574,7 @@ public class CocoonServlet extends HttpS req, res, this.servletContext, - (HttpContext) this.appContext.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT), + this.environmentContext, this.containerEncoding, formEncoding); env.enableLogging(getLogger()); @@ -642,6 +639,7 @@ public class CocoonServlet extends HttpS private final File writeableContextPath; private final String contextPath; public Logger logger; + private final HttpContext environmentContext; public ServletBootstrapEnvironment(ServletConfig config, ClassLoader cl, @@ -655,6 +653,7 @@ public class CocoonServlet extends HttpS this.writeableContextPath = new File(writeablePath); } this.contextPath = path; + this.environmentContext = new HttpContext(this.config.getServletContext()); } /** @@ -708,7 +707,7 @@ public class CocoonServlet extends HttpS * @see org.apache.cocoon.core.BootstrapEnvironment#getEnvironmentContext() */ public Context getEnvironmentContext() { - return new HttpContext(this.config.getServletContext()); + return this.environmentContext; } /**
infrastructure at apache.org | ViewVC Help |
Powered by ViewVC 1.1.26 |