Return-Path: Delivered-To: apmail-portals-pluto-scm-archive@www.apache.org Received: (qmail 3855 invoked from network); 4 May 2009 14:40:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 May 2009 14:40:20 -0000 Received: (qmail 50409 invoked by uid 500); 4 May 2009 14:40:20 -0000 Delivered-To: apmail-portals-pluto-scm-archive@portals.apache.org Received: (qmail 50355 invoked by uid 500); 4 May 2009 14:40:19 -0000 Mailing-List: contact pluto-scm-help@portals.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list pluto-scm@portals.apache.org Received: (qmail 50345 invoked by uid 99); 4 May 2009 14:40:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 14:40:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 14:40:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C13F223889B9; Mon, 4 May 2009 14:39:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r771319 [2/2] - in /portals/pluto/trunk: pluto-container-api/src/main/java/org/apache/pluto/container/ pluto-container-api/src/main/java/org/apache/pluto/container/om/portlet/ pluto-container-driver-api/src/main/java/org/apache/pluto/contai... Date: Mon, 04 May 2009 14:39:50 -0000 To: pluto-scm@portals.apache.org From: ate@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090504143951.C13F223889B9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestDispatcherImpl.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestDispatcherImpl.java?rev=771319&r1=771318&r2=771319&view=diff ============================================================================== --- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestDispatcherImpl.java (original) +++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestDispatcherImpl.java Mon May 4 14:39:49 2009 @@ -39,7 +39,6 @@ import org.slf4j.LoggerFactory; import org.apache.pluto.container.PortletInvokerService; import org.apache.pluto.container.PortletRequestContext; -import org.apache.pluto.container.RequestDispatcherPathInfo; /** * Implementation of the PortletRequestDispatcher interface. @@ -56,7 +55,7 @@ /** The nested servlet request dispatcher instance. */ private RequestDispatcher requestDispatcher; - private RequestDispatcherPathInfo pathInfo; + private boolean namedDispatch; // Constructors ------------------------------------------------------------ @@ -65,13 +64,14 @@ * Creates an instance. This constructor should be called to construct a * portlet request dispatcher. * @param requestDispatcher the servlet request dispatcher. - * @param pathInfo + * @param namedDispatch true if requestDispatcher is a named dispatcher + * @see javax.portlet.PortletContext#getNamedDispatcher(String) * @see javax.portlet.PortletContext#getRequestDispatcher(String) */ - public PortletRequestDispatcherImpl(RequestDispatcher requestDispatcher, RequestDispatcherPathInfo pathInfo) + public PortletRequestDispatcherImpl(RequestDispatcher requestDispatcher, boolean namedDispatch) { this.requestDispatcher = requestDispatcher; - this.pathInfo = pathInfo; + this.namedDispatch = namedDispatch; if (LOG.isDebugEnabled()) { @@ -152,17 +152,17 @@ requestContext.getServletContext(), session, request, - pathInfo, - included); + included, + namedDispatch); HttpServletPortletResponseWrapper res = new HttpServletPortletResponseWrapper(requestContext.getServletResponse(), request, response, - included); + included); try { - req.setAttribute(PortletInvokerService.PORTLET_CONFIG, requestContext.getPortletConfig()); - req.setAttribute(PortletInvokerService.PORTLET_REQUEST, request); - req.setAttribute(PortletInvokerService.PORTLET_RESPONSE, response); + request.setAttribute(PortletInvokerService.PORTLET_CONFIG, requestContext.getPortletConfig()); + request.setAttribute(PortletInvokerService.PORTLET_REQUEST, request); + request.setAttribute(PortletInvokerService.PORTLET_RESPONSE, response); if (!included && req.isForwardingPossible()) { @@ -170,6 +170,7 @@ } else { + // need to "fake" the forward using an include requestDispatcher.include(req, res); } if (needsFlushAfterForward) @@ -187,9 +188,9 @@ } finally { - req.removeAttribute(PortletInvokerService.PORTLET_CONFIG); - req.removeAttribute(PortletInvokerService.PORTLET_REQUEST); - req.removeAttribute(PortletInvokerService.PORTLET_RESPONSE); + request.removeAttribute(PortletInvokerService.PORTLET_CONFIG); + request.removeAttribute(PortletInvokerService.PORTLET_REQUEST); + request.removeAttribute(PortletInvokerService.PORTLET_RESPONSE); } } @@ -209,45 +210,6 @@ return portletScopeSessionConfigured; } - private void doDispatch(ServletRequest request, ServletResponse response, HttpServletPortletRequestWrapper req, - HttpServletPortletResponseWrapper res, boolean included) throws ServletException, IOException - { - if (!included) - { - res.resetBuffer(); - } - - ServletRequest currentInitialRequest = req.getInitialRequest(); - RequestDispatcherPathInfo currentMethodPathInfo = req.getMethodPathInfo(); - Map currentPathInfoAttributes = req.getPathInfoAttributes(); - boolean currentIncluded = req.isIncluded(); - try - { - RequestDispatcherPathInfo methodPathInfo = null; - if (currentMethodPathInfo.isNamedRequestDispatcher() || !(included || pathInfo.isNamedRequestDispatcher())) - { - methodPathInfo = pathInfo; - } - else - { - methodPathInfo = currentMethodPathInfo; - } - req.setNewPathInfo(methodPathInfo, included); - if (!included && req.isForwardingPossible()) - { - requestDispatcher.forward(request, response); - } - else - { - requestDispatcher.include(request, response); - } - } - finally - { - req.restorePathInfo(currentInitialRequest, currentMethodPathInfo, currentPathInfoAttributes, currentIncluded); - } - } - // PortletRequestDispatcher Impl ------------------------------------------- public void forward(PortletRequest request, PortletResponse response) throws PortletException, IOException @@ -265,15 +227,44 @@ doDispatch(request, response, true); } - // RequestDispatcher Impl ------------------------------------------- + // Nested RequestDispatcher Impl ------------------------------------------- public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { - doDispatch(request, response, getWrappedRequest(request), getWrappedResponse(response), false); + HttpServletPortletRequestWrapper req = getWrappedRequest(request); + HttpServletPortletResponseWrapper res = getWrappedResponse(response); + res.resetBuffer(); + + // cache the current dispatch state + boolean forwarded = req.isForwarded(); + boolean namedDispatch = req.isNamedDispatch(); + Map pathAttributeValues = req.getPathAttributeValues(); + HttpServletPortletRequestWrapper.PathMethodValues pathMethodValues = req.getInitPathMethodValues(); + + // (re)initialize the request wrapper to a nested forward + req.setNestedForward(); + try + { + if (req.isForwardingPossible()) + { + requestDispatcher.forward(request, response); + } + else + { + // need to "fake" the forward using an include + requestDispatcher.include(request, response); + } + } + finally + { + // restore the previously cached dispatch state + req.restoreFromNestedForward(forwarded, namedDispatch, pathMethodValues, pathAttributeValues); + } } public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException { - doDispatch(request, response, getWrappedRequest(request), getWrappedResponse(response), true); + // no need for special handling on a nested dispatcher include: just calling the wrapped servlet dispatcher + requestDispatcher.include(request, response); } } Added: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java?rev=771319&view=auto ============================================================================== --- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java (added) +++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java Mon May 4 14:39:49 2009 @@ -0,0 +1,153 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.pluto.container.impl; + +import javax.portlet.PortletRequest; +import javax.portlet.PortletRequestDispatcher; +import javax.portlet.PortletResponse; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServletResponseWrapper; +import javax.servlet.http.HttpSession; + +import org.apache.pluto.container.RequestDispatcherService; +import org.apache.pluto.container.om.portlet.PortletApplicationDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @version $Id$ + * + */ +public class RequestDispatcherServiceImpl implements RequestDispatcherService +{ + /** + * Logger. + */ + + private static final Logger LOG = LoggerFactory.getLogger(RequestDispatcherServiceImpl.class); + + public RequestDispatcherServiceImpl() + { + this(0); + } + + public RequestDispatcherServiceImpl(int dispatchDetectionOrdinal) + { + if (dispatchDetectionOrdinal == HttpServletPortletRequestWrapper.DispatchDetection.CHECK_STATE.ordinal()) + { + HttpServletPortletRequestWrapper.dispatchDetection = HttpServletPortletRequestWrapper.DispatchDetection.CHECK_STATE; + } + else if (dispatchDetectionOrdinal == HttpServletPortletRequestWrapper.DispatchDetection.CHECK_REQUEST_WRAPPER_STACK.ordinal()) + { + HttpServletPortletRequestWrapper.dispatchDetection = HttpServletPortletRequestWrapper.DispatchDetection.CHECK_STATE; + } + else + { + HttpServletPortletRequestWrapper.dispatchDetection = HttpServletPortletRequestWrapper.DispatchDetection.EVALUATE; + } + } + + public PortletRequestDispatcher getNamedDispatcher(ServletContext servletContext, PortletApplicationDefinition app, + String name) + { + if (LOG.isDebugEnabled()) + { + LOG.debug("Named PortletRequestDispatcher requested for name: "+name+" at context: "+app.getContextPath()); + } + + RequestDispatcher dispatcher = servletContext.getNamedDispatcher(name); + if (dispatcher != null) + { + return new PortletRequestDispatcherImpl(dispatcher, true); + } + if (LOG.isInfoEnabled()) + { + LOG.info("No matching request dispatcher found for name: "+ name); + } + return null; + } + + public PortletRequestDispatcher getRequestDispatcher(ServletContext servletContext, + PortletApplicationDefinition app, String path) + { + if (LOG.isDebugEnabled()) + { + LOG.debug("PortletRequestDispatcher requested for path: " + path+" at context: "+app.getContextPath()); + } + + // Check if the path name is valid. A valid path name must not be null + // and must start with a slash '/' as defined by the portlet spec. + if (path == null || !path.startsWith("/")) + { + if (LOG.isInfoEnabled()) + { + LOG.info("Failed to retrieve PortletRequestDispatcher: path name must begin with a slash '/'."); + } + return null; + } + + // Construct PortletRequestDispatcher. + PortletRequestDispatcher portletRequestDispatcher = null; + try + { + RequestDispatcher servletRequestDispatcher = servletContext.getRequestDispatcher(path); + if (servletRequestDispatcher != null) + { + portletRequestDispatcher = new PortletRequestDispatcherImpl(servletRequestDispatcher, false); + } + else + { + if (LOG.isInfoEnabled()) + { + LOG.info("No matching request dispatcher found for: " + path); + } + } + } + catch (Exception ex) + { + // We need to catch exception because of a Tomcat 4.x bug. + // Tomcat throws an exception instead of return null if the path + // was not found. + if (LOG.isInfoEnabled()) + { + LOG.info("Failed to retrieve PortletRequestDispatcher: "+ ex.getMessage()); + } + portletRequestDispatcher = null; + } + return portletRequestDispatcher; + } + + public HttpServletRequestWrapper getRequestWrapper(ServletContext servletContext, + HttpServletRequest servletRequest, + PortletRequest portletRequest, HttpSession session, + boolean included, boolean named) + { + return new HttpServletPortletRequestWrapper(servletRequest, servletContext, session, portletRequest, included, named); + } + + public HttpServletResponseWrapper getResponseWraper(ServletContext servletContext, + HttpServletResponse servletResponse, + PortletRequest portletRequest, PortletResponse portletResponse, + boolean included) + { + return new HttpServletPortletResponseWrapper(servletResponse, portletRequest, portletResponse, included); + } +} Propchange: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java ------------------------------------------------------------------------------ svn:keywords = Id Propchange: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/RequestDispatcherServiceImpl.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/PortletAppType.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/PortletAppType.java?rev=771319&r1=771318&r2=771319&view=diff ============================================================================== --- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/PortletAppType.java (original) +++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/PortletAppType.java Mon May 4 14:39:49 2009 @@ -18,11 +18,9 @@ import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Set; import javax.xml.XMLConstants; import javax.xml.bind.annotation.XmlAccessType; @@ -126,8 +124,6 @@ @XmlTransient protected String contextPath; @XmlTransient - protected Set servletMappingURLPatterns; - @XmlTransient protected Map localeEncodingMappings; public String getName() @@ -537,20 +533,6 @@ } } - public Set getServletMappingURLPatterns() - { - if (servletMappingURLPatterns == null) - { - servletMappingURLPatterns = new HashSet(); - } - return servletMappingURLPatterns; - } - - public void addServletMappingURLPattern(String servletMappingURLPattern) - { - getServletMappingURLPatterns().add(servletMappingURLPattern); - } - public Map getLocaleEncodingMappings() { if (localeEncodingMappings == null) Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultOptionalContainerServices.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultOptionalContainerServices.java?rev=771319&r1=771318&r2=771319&view=diff ============================================================================== --- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultOptionalContainerServices.java (original) +++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultOptionalContainerServices.java Mon May 4 14:39:49 2009 @@ -22,6 +22,7 @@ import org.apache.pluto.container.PortletEnvironmentService; import org.apache.pluto.container.PortletInvokerService; import org.apache.pluto.container.PortletPreferencesService; +import org.apache.pluto.container.RequestDispatcherService; import org.apache.pluto.container.UserInfoService; import org.apache.pluto.container.driver.OptionalContainerServices; import org.apache.pluto.container.driver.PortalAdministrationService; @@ -30,6 +31,7 @@ import org.apache.pluto.container.driver.PortletRegistryService; import org.apache.pluto.container.impl.PortletEnvironmentServiceImpl; import org.apache.pluto.container.impl.PortletAppDescriptorServiceImpl; +import org.apache.pluto.container.impl.RequestDispatcherServiceImpl; /** * Default Optional Container Services and Portal Driver Services implementation. @@ -49,14 +51,16 @@ private NamespaceMapper namespaceMapper; private PortletAppDescriptorService descriptorService; private CCPPProfileService ccppProfileService; + private RequestDispatcherService rdService; /** * Constructs an instance using the default portlet preferences service * implementation. */ public DefaultOptionalContainerServices() { + rdService = new RequestDispatcherServiceImpl(); portletPreferencesService = new DefaultPortletPreferencesService(); - portletRegistryService = new PortletContextManager(); + portletRegistryService = new PortletContextManager(rdService); portletContextService = (PortletContextManager)portletRegistryService; portletInvokerService = new DefaultPortletInvokerService(portletContextService); portletEnvironmentService = new PortletEnvironmentServiceImpl(); @@ -167,5 +171,10 @@ { return ccppProfileService; } + + public RequestDispatcherService getRequestDispatcherService() + { + return rdService; + } } Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletContextImpl.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletContextImpl.java?rev=771319&r1=771318&r2=771319&view=diff ============================================================================== --- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletContextImpl.java (original) +++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletContextImpl.java Mon May 4 14:39:49 2009 @@ -18,6 +18,7 @@ import javax.servlet.ServletContext; +import org.apache.pluto.container.RequestDispatcherService; import org.apache.pluto.container.driver.DriverPortletContext; import org.apache.pluto.container.impl.PortletContextImpl; import org.apache.pluto.container.om.portlet.PortletApplicationDefinition; @@ -43,9 +44,10 @@ * @param portletAppDD the portlet application descriptor. */ public DriverPortletContextImpl(ServletContext servletContext, - PortletApplicationDefinition portletApp) + PortletApplicationDefinition portletApp, + RequestDispatcherService rdService) { - super(servletContext, portletApp, PlutoContainerInfo.getInfo(), Configuration.getSupportedContainerRuntimeOptions()); + super(servletContext, portletApp, PlutoContainerInfo.getInfo(), Configuration.getSupportedContainerRuntimeOptions(), rdService); init(); } Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortalDriverServicesImpl.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortalDriverServicesImpl.java?rev=771319&r1=771318&r2=771319&view=diff ============================================================================== --- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortalDriverServicesImpl.java (original) +++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortalDriverServicesImpl.java Mon May 4 14:39:49 2009 @@ -27,6 +27,7 @@ import org.apache.pluto.container.PortletPreferencesService; import org.apache.pluto.container.PortletRequestContextService; import org.apache.pluto.container.PortletURLListenerService; +import org.apache.pluto.container.RequestDispatcherService; import org.apache.pluto.container.UserInfoService; import org.apache.pluto.container.driver.OptionalContainerServices; import org.apache.pluto.container.driver.PortalAdministrationService; @@ -35,6 +36,7 @@ import org.apache.pluto.container.driver.PortletRegistryService; import org.apache.pluto.container.driver.RequiredContainerServices; import org.apache.pluto.container.impl.PortletEnvironmentServiceImpl; +import org.apache.pluto.container.impl.RequestDispatcherServiceImpl; public class PortalDriverServicesImpl implements RequiredContainerServices, OptionalContainerServices, PortalDriverServices @@ -57,6 +59,7 @@ private PortletEnvironmentService portletEnvironmentService; private UserInfoService userInfoService; private NamespaceMapper namespaceMapper; + private RequestDispatcherService rdService; /* * portal driver services @@ -137,6 +140,7 @@ portletEnvironmentService = optionalServices.getPortletEnvironmentService(); userInfoService = optionalServices.getUserInfoService(); namespaceMapper = optionalServices.getNamespaceMapper(); + rdService = optionalServices.getRequestDispatcherService(); } // and finally driver @@ -160,7 +164,8 @@ protected void createDefaultServicesIfNeeded() { - portletRegistryService = portletRegistryService == null ? new PortletContextManager() : portletRegistryService; + rdService = rdService == null ? new RequestDispatcherServiceImpl() : rdService; + portletRegistryService = portletRegistryService == null ? new PortletContextManager(rdService) : portletRegistryService; portletContextService = portletContextService == null ? (PortletContextManager)portletRegistryService : portletContextService; portalAdministrationService = portalAdministrationService == null ? new DefaultPortalAdministrationService() : portalAdministrationService; ccppProfileService = ccppProfileService == null ? new DummyCCPPProfileServiceImpl() : ccppProfileService; @@ -256,4 +261,9 @@ { return portletURLListenerService; } + + public RequestDispatcherService getRequestDispatcherService() + { + return rdService; + } } Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortletContextManager.java URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortletContextManager.java?rev=771319&r1=771318&r2=771319&view=diff ============================================================================== --- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortletContextManager.java (original) +++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/PortletContextManager.java Mon May 4 14:39:49 2009 @@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory; import org.apache.pluto.container.PortletContainerException; import org.apache.pluto.container.PortletWindow; +import org.apache.pluto.container.RequestDispatcherService; import org.apache.pluto.container.driver.DriverPortletConfig; import org.apache.pluto.container.driver.DriverPortletContext; import org.apache.pluto.container.driver.PortletContextService; @@ -87,14 +88,13 @@ * The classloader for the portal, key is portletWindow and value is the classloader. */ private final Map classLoaders = new HashMap(); + + private RequestDispatcherService rdService; // Constructor ------------------------------------------------------------- - /** - * Private constructor that prevents external instantiation. - */ - public PortletContextManager() { - // Do nothing. + public PortletContextManager(RequestDispatcherService rdService) { + this.rdService = rdService; } @@ -117,7 +117,7 @@ PortletApplicationDefinition portletApp = portletRegistry.getPortletAppDD(servletContext, applicationName, contextPath); - DriverPortletContext portletContext = new DriverPortletContextImpl(servletContext, portletApp); + DriverPortletContext portletContext = new DriverPortletContextImpl(servletContext, portletApp, rdService); portletContexts.put(applicationName, portletContext);