portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker ServletPortletInvoker.java
Date Tue, 02 Mar 2004 02:48:12 GMT
weaver      2004/03/01 18:48:12

  Modified:    portal/src/java/org/apache/jetspeed/container/invoker
                        ServletPortletInvoker.java
  Log:
  added check for web application presence
  
  Revision  Changes    Path
  1.12      +8 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
  
  Index: ServletPortletInvoker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ServletPortletInvoker.java	14 Jan 2004 01:47:27 -0000	1.11
  +++ ServletPortletInvoker.java	2 Mar 2004 02:48:12 -0000	1.12
  @@ -77,6 +77,7 @@
   import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
   import org.apache.pluto.core.impl.PortletConfigImpl;
   import org.apache.pluto.om.portlet.PortletDefinition;
  +import org.apache.pluto.om.servlet.WebApplicationDefinition;
   
   /**
    * ServletPortletInvoker invokes portlets in another web application, calling a 
  @@ -199,7 +200,12 @@
       {
           MutablePortletApplication app = (MutablePortletApplication)portletDefinition.getPortletApplicationDefinition();
   
  -        String portletApplicationName = app.getWebApplicationDefinition().getContextRoot();
  +        WebApplicationDefinition webApplicationDefinition = app.getWebApplicationDefinition();
  +        if(webApplicationDefinition == null)
  +        {
  +        	throw new IllegalStateException("Portlet application "+app.getName()+ " has no
associated web application.");
  +        }
  +        String portletApplicationName = webApplicationDefinition.getContextRoot();
   
           // gather all required data from request and response
           ServletRequest servletRequest = ((javax.servlet.http.HttpServletRequestWrapper)
portletRequest).getRequest();
  
  
  

---------------------------------------------------------------------
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