weaver      2003/10/21 13:47:08

  Added:       design-docs/src request_lifcycle.htm
  Log:
  Action reqeust life cycel document
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/design-docs/src/request_lifcycle.htm
  
  Index: request_lifcycle.htm
  ===================================================================
  <html>
  <head>
  <title>Portlet Action  Request Life Cycle</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  </head>
  
  <body bgcolor="#FFFFFF" text="#000000">
  <div width="600"> 
    <ol>
      <li> The o.a.j.container.ContainerValve receives the request.</li>
      <li>The request is then inspected by the 
o.a.j.engine.core.PortalControlParameter.getPortletWindowOfAction() 
        to see whether or not a portlet action has been requested.</li>
      <li>If an action has been found the 
o.a.j.request.RequestContext.setActionWindow() 
        is passed that action window, if not it is passed null.</li>
      <li>Next the ActionValve checks to see if the there is an action window defined, 
        if the there is there, the PortletContainer.processPortletAction() is called 
        by passing in the action window and HttpServletRequest aand 
httpServletResponse 
        objects. &nbsp;&nbsp;The request and response objects are actually wrappers 
        around the original request and response objects which can parse action 
        and/or render parameters for a specific PortletWindow. These wrappers are 
        generated by calling RequestContext.getRequestForWindow() and 
RequestContext.getResponseForWindow() 
        respectively.</li>
      <li>The container now handles the request. The container is responsible to 
        generating an ActionRequest and an ActionResponse for the portlet action 
        to be invoked. &nbsp;Next the creates a new PortletInvoker object by passsing 
        the PortletDefinition which was extract from the PortletWindow via the 
PortletEntity.&nbsp;&nbsp; 
        In Jetspeed's case, the PortletInvoker will be an instance of 
o.a.j.container.invoker.ServletPortletInvoker. 
        &nbsp;The &nbsp;PortletInvoker.action() method is called passing in the 
        previously generated ActionRequest and ActionResponse.</li>
      <li>ServletPortletInvoker receives the ActionRequest and ActionResponse from 
        the container. &nbsp;From here the ServletPortletInvoker extracts the 
ServletRequest 
        and ServletResponse from the ActionRequest and ActionResponse respectively. 
        &nbsp;</li>
      <li>The PortletDefintion (which was provided at creation time to the 
ServletPortletInvoker) 
        is queried for the WebApplication object which has the context path of the 
        web app that controls this portlet.&nbsp;&nbsp;</li>
      <li>With the name of the webapp ServletPortletInvoker no dispatches the request 
        to the actual web application represented by the context 
path.&nbsp;&nbsp;NOTE: 
        &nbsp;All portlet applications must contain a definition in its web.xml 
        for the o.a.j.container.JetspeedContainerPortlet.&nbsp;&nbsp;However, 
Jetspeed's 
        deployment tool will generally take care of this for you.</li>
      <li>Once the JetspeedContainerServlet receives the request, it invokes 
Portlet.processAction(ActionRequest, 
        ActionResponse) on your portlet.</li>
      <li>After the PortletInvoker and the JetspeedContainerServlet are finished 
        the container once again takes control. &nbsp;The container gets the 
redirection 
        location from the response using 
ActionResponse.getRedirectLocation().&nbsp;&nbsp;The 
        ActionResponse is now checked to see if the state or the mode of the portlet 
        has changed and communicates this information PortletWindow we are invoking 
        the action on.&nbsp;&nbsp;These changes are also applied to the rediretion 
        location and passed to the current ServletResponse.sendRedirect() method 
        so that all the encoded portlet state information is preserved in the 
URL&gt;</li>
    </ol>
    <p>&nbsp;</p>
    bottom
  </div>
  </body>
  </html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to