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/20 02:00:13 UTC

cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl AbstractPortalURL.java

taylor      2004/08/19 17:00:13

  Modified:    portal/src/java/org/apache/jetspeed/container/url/impl
                        AbstractPortalURL.java
  Log:
  when building PortalURLs, first check the request attribute "org.apache.jetspeed.context" for the actual portal context
  it appears that weblogic interrupts the servlet spec SRV 8.3.1 differently from Tomcat and JBoss regarding which context gets returned by either:
  
  request.getContextPath()
  request.getAttribute("javax.servlet.include.context_path")
  
  with Tomcat or JBoss it returns the dispatching servlet context i.e. "/jetspeed"
  with Weblogic it returns the dispatched servlet context i.e. "/HW_App"
  
  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.9       +8 -9      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
  
  Index: AbstractPortalURL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AbstractPortalURL.java	19 Aug 2004 17:28:48 -0000	1.8
  +++ AbstractPortalURL.java	20 Aug 2004 00:00:13 -0000	1.9
  @@ -25,6 +25,7 @@
   import javax.portlet.PortletMode;
   import javax.portlet.WindowState;
   
  +import org.apache.jetspeed.container.ContainerConstants;
   import org.apache.jetspeed.container.session.NavigationalStateComponent;
   import org.apache.jetspeed.container.url.PortalControlParameter;
   import org.apache.jetspeed.container.url.PortalURL;
  @@ -75,17 +76,15 @@
               this.serverName = context.getRequest().getServerName();
               this.serverPort = context.getRequest().getServerPort();
               this.serverScheme = context.getRequest().getScheme();
  -            this.contextPath = context.getRequest().getContextPath();
  +            this.contextPath = (String)context.getRequest().getAttribute(ContainerConstants.PORTAL_CONTEXT); 
               if (contextPath == null)
               {
  -                contextPath = "";
  +                context.getRequest().getContextPath();
               }
  -            
  -            // NOTE: i will remove this as soon as I figure out why 
  -            // weblogic is return the PA context instead of the portal context
  -            // will remove it by end of day today
  -            contextPath = "/jetspeed"; 
  -            
  +            if (contextPath == null)
  +            {
  +                contextPath = "";
  +            }                        
               String servletPath = context.getRequest().getServletPath();
               if (servletPath == null)
               {
  
  
  

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