Pages

Wednesday 5 March 2014

Page Rendering/Loading in LIFERAY | Flow of Liferay Portal Server (TOMCAT)



Pages are rendered via the following mechanism:
  1. Request comes in through MainServlet. Various attributes are stored in the session and request. The request attribute WebKeys.CURRENT_URL holds the currently requested path (stripped of protocol,host, and port)
  2. The "service pre action" handler com.liferay.portal.events.ServicePreAction is called, where the layout and theme to display are determined. The current layout is stored as a request attribute under the key WebKeys.LAYOUT. The other available layouts are stored as a request attribute under the key WebKeys.LAYOUTS. The theme to display is stored as a request attribute under the WebKeys.THEME key, and the color scheme to use is stored as the request attribute WebKeys.COLOR_SCHEME. The theme and color scheme are usually determined by querying the layout once it has been determined.
  3. Struts is called to handle the request, and Liferay uses the custom Struts request processor com.liferay.portal.struts.PortalRequestProcessor. The PortalRequestProcessor.getLastPath() method computes the last path visited, and supplies a default path for the first entry into the portal. The default path upon entry into the portal is <protocol>://<hostName>:<port>/portal/layout. This url may optionally contain the query parameters ?p_l_id=default if the user is known (i.e. they have just logged in).
  4. This initial request for /portal/layout is handled by com.liferay.portal.action.LayoutAction.
  5. /html/common/themes/portal.jsp is the "top level" display page. It selects...
  6. the portal_normal.jsp or portal_pop_up.jsp based on the current state of the theme's display, and includes it using the <liferay-theme:include> custom tag, implemented by com.liferay.taglib.theme.IncludeTag, which in turn calls com.liferay.taglib.util.ThemeUtil.include().
  7. Eventually, for each portlet, the method com.liferay.portal.util.PortalUtil.renderPortlet() gets called, which calls
  8. /portal/portal-web/docroot/html/portal/render_portlet.jsp to render the contents of an individual portlet. That in turn calls
  9. /portal/portal-web/docroot/html/common/themes/portlet.jsp, which ends up calling
  10. /portal/portal-web/docroot/html/common/themes/portlet_content.jsp

1 comment:

  1. Demand comes in through MainServlet. Various features are saved in the period as well as. The request feature WebKeys.CURRENT_URL keeps the currently asked for direction (stripped of method,host, and port)

    Spybubble Gratis

    ReplyDelete