You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/08/06 18:57:55 UTC

cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl PortletRendererImpl.java

taylor      2004/08/06 09:57:55

  Modified:    portal/src/java/org/apache/jetspeed/aggregator/impl
                        PortletRendererImpl.java
  Log:
  Fix bug with wrong Servlet Request (and Portlet Window) associated with current Portlet Request
  I just found a problem with request parameters not being returned on portlets
  This was due to the wrong servlet request wrapper associated with the current portlet request
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.18      +8 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java
  
  Index: PortletRendererImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- PortletRendererImpl.java	28 Jul 2004 13:23:09 -0000	1.17
  +++ PortletRendererImpl.java	6 Aug 2004 16:57:55 -0000	1.18
  @@ -20,6 +20,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.aggregator.ContentDispatcher;
   import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
   import org.apache.jetspeed.aggregator.FailedToRenderFragmentException;
  @@ -28,6 +29,7 @@
   import org.apache.jetspeed.container.window.FailedToRetrievePortletWindow;
   import org.apache.jetspeed.container.window.PortletWindowAccessor;
   import org.apache.jetspeed.om.page.Fragment;
  +import org.apache.jetspeed.request.JetspeedRequestContext;
   import org.apache.jetspeed.request.RequestContext;
   import org.apache.jetspeed.util.JetspeedObjectID;
   import org.apache.pluto.PortletContainer;
  @@ -124,8 +126,12 @@
           //
           try
           {
  +            RequestContext context = (RequestContext) request.getAttribute("org.apache.jetspeed.request.RequestContext");
               PortletWindow portletWindow = getPortletWindow(fragment);
  -            container.renderPortlet(portletWindow, request, response);
  +            HttpServletRequest servletRequest = context.getRequestForWindow(portletWindow);
  +            HttpServletResponse servletResponse = context.getResponseForWindow(portletWindow);
  +            
  +            container.renderPortlet(portletWindow, servletRequest, servletResponse);
           }
           catch (Exception e)
           {            
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org