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 we...@apache.org on 2003/10/21 22:47:08 UTC
cvs commit: jakarta-jetspeed-2/design-docs/src request_lifcycle.htm
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. 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. Next the creates a new PortletInvoker object by passsing
the PortletDefinition which was extract from the PortletWindow via the PortletEntity.
In Jetspeed's case, the PortletInvoker will be an instance of o.a.j.container.invoker.ServletPortletInvoker.
The PortletInvoker.action() method is called passing in the
previously generated ActionRequest and ActionResponse.</li>
<li>ServletPortletInvoker receives the ActionRequest and ActionResponse from
the container. From here the ServletPortletInvoker extracts the ServletRequest
and ServletResponse from the ActionRequest and ActionResponse respectively.
</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. </li>
<li>With the name of the webapp ServletPortletInvoker no dispatches the request
to the actual web application represented by the context path. NOTE:
All portlet applications must contain a definition in its web.xml
for the o.a.j.container.JetspeedContainerPortlet. 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. The container gets the redirection
location from the response using ActionResponse.getRedirectLocation(). 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. 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></li>
</ol>
<p> </p>
bottom
</div>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org