portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet ServletRequestImpl.java
Date Tue, 20 Jul 2004 19:57:25 GMT
taylor      2004/07/20 12:57:25

  Modified:    portal/src/java/org/apache/jetspeed/engine/servlet
                        ServletRequestImpl.java
  Log:
  http://nagoya.apache.org/jira/browse/JS2-98
  
   getAttribute() method on the HttpServletRequest is tested and appears to be working.
  This does not close this bug
  
  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.19      +17 -2     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
  
  Index: ServletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ServletRequestImpl.java	20 Jul 2004 05:53:20 -0000	1.18
  +++ ServletRequestImpl.java	20 Jul 2004 19:57:25 -0000	1.19
  @@ -42,6 +42,7 @@
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.portlet.PortletApplicationDefinition;
   import org.apache.pluto.om.window.PortletWindow;
  +import org.apache.pluto.util.NamespaceMapperAccess;
   
   /**
    * This request wrappers the servlet request and is used within the container to
  @@ -207,7 +208,7 @@
        */
       public Object getAttribute(String name)
       {
  -        Object value = super.getAttribute(name);
  +        Object value = super.getAttribute(name);        
           if (name.equals(PortletRequest.USER_INFO))
           {
               JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
  @@ -233,6 +234,20 @@
                       log.error("Entity is null:" + entityID);
                   }
   
  +            }
  +        }
  +        else
  +        {
  +            if (null == value)
  +            {
  +                PortletRequest pr = (PortletRequest)super.getAttribute("javax.portlet.request");
  +                if (pr != null)
  +                {
  +                    value = super.getAttribute(
  +                                NamespaceMapperAccess
  +                                    .getNamespaceMapper()
  +                                    .encode(portletWindow.getId(), name));
  +                }
               }
           }
           return value;
  
  
  

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


Mime
View raw message