+

Search Tips   |   Advanced Search

<portal-core/> tags

The <portal-core/> tags are used to provide portal core functionality such as entering the main render flow as well as URL-related aspects of the page. Do not use portal tags in portlet JSPs. The following tags are only for use in theme and skin JSPs.

    Tag Description
    <portal-core:cacheProxyUrl/> Create a URL to the caching proxy servlet. This tag is deprecated for IBM WebSphere Portal 8.0.
    <portal-core:constants/> Make the <%= wpsBaseURL %> and <%= wpsDocURL %> constants available to the page.
    <portal-core:defineObjects/> Set of objects which can be used later on (for example, escapeXmlWriter).
    <portal-core:init-lazy-set/> Initializes the lazy set functionality and is required to be called in the outer most JSP. For example in the theme it would be the default.jsp. It must not be placed in a dynamic content spot JSP.
    <portal-core:lazy-set/> Evaluate the given EL expression unless it has been cached already with the current request and stores a variable in the request scope with the given name (var).

    Attributes:

      var Variable name to be set into the request.
      elExpression EL expression to be evaluated. Must not contain the ${} because the JSP engine evaluates everything that is surrounded by ${} as an EL Bean. This invalidates all performance improvements.

    For example:

      <portal-core:lazy-set var="deviceClass" elExpression="wp.clientProfile['DeviceClass']"/>
    <portal-core:pageRender/> Used in the Home screen to render the content of the selected page. Do not confuse this with the <portal-core:pageRender/> tag deprecated in V4.2.
    <portal-core:screenRender/> Starts the rendering of the screen. This tag should be used only in theme JSPs.
    <portal-core:stateBase/> Stores a base URL which can be used instead of full, newly-coded URLs on each occurrence of a URL in the markup. This tag should occur only in the header section of the markup, which is provided by theme JSPs.

    <portal-core:cacheProxyUrl forwardurl="url_string"/>

    Create a URL to the caching proxy servlet. The URL created is fully cacheable and includes information about the requesting client. The CC/PP client profile is used for gathering information about the client for the URL. The purpose of this tag is to link .CSS files into the JSP. The tag has one attribute.

    For security reasons, the cache proxy servlet will only serve URLs pointing to resources located in the themes, skins, and screens directories. This makes all resources underneath these directories public. Also, any URLs containing the ".." characters will not be served.

    Attributes:

      forwardurl Address to the file to be sent to the caching proxy servlet. This attribute can be set by passing in a String or a URL object.

    The following code example uses this tag to link a CSS file in a JSP:

      <link href="<portal-core:cacheProxyUrl forwardurl="<portal-logic:urlFindInTheme type="css" file="styles.jsp"/>"/>">

    <portal-core:constants/>

    Makes the following constants available to the page:

    • <%= wpsBaseURL %>

      Provide the context path of the portal site as specified during installation, for example, /wps

    • <%= wpsDocURL %>

      Provide the URL to the product documentation located in the WebSphere Portal Web application directory, including the Javadoc information, and portal help. The URL returned includes the locale of the client, for example, /wps/doc/locale/. For example, the following code would generate a URL to the portal help:

        <%= wpsDocURL %>/help/index.html

    <portal-core:defineObjects/>

    Define a set of objects which can be used later (for example, escapeXmlWriter). Makes the following constants available to the page:

    • <%= escapeXmlWriter %>

      Write out URLs in XML compliant representation:

       
      <portal-navigation:urlGeneration contentNode="wps.Links" portletMode="view">
        <c:set var="title"><portal-fmt:text bundle="nls.bundle" key="link" /></c:set>
        <a href="<% wpsURL.write(escapeXmlWriter); %>"><c-rt:out value='${title}' escapeXml='true' /></a>
       </portal-navigation:urlGeneration>  

    <portal-core:pageRender/>

    Used in the Home screen to render the content of the selected page. Do not confuse this with the <portal-core:pageRender/> tag deprecated in V4.2. This tag renders the portal page without the navigation. When this tag is called, all pages available for the user are determined.

    <portal-core:screenRender/>

    Renders the current screen. Types of screens include Home (default), Login, and Error. This tag can only be used once in the portal. This tag should be used only in theme JSPs.

    Example

    This part of the Default.jsp portlets.

    <div id="FLYParent">
     <%@ include file="./banner.jspf" %>
     <portal-logic:if portletSolo="no">
       <%@ include file="./topNav.jspf" %>
       <%@ include file="./sideNav.jspf" %>
     <portal-logic:if/>
      <a name="wpsMainContent">
     <%-- Call the portal engine command to render the portlets for this page --%>
     <div id="mainContent"><portal-core:screenRender/></div>
      <portal-logic:if portletSolo="no">
       <%@ include file="./footer.jspf" %>
       <%@ include file="./flyout.jspf" %>
     </portal-logic:if>
     <portal-logic:if loggedIn="yes">    
    </div>    

    <portal-core:stateBase/>

    Store a base URL which can be used instead of full, newly-coded URLs on each occurrence of a URL in the markup. This enables shorter URLs and can improve the page serving performance. This tag should occur only in the header section of the markup - it is not allowed to occur outside of the header section. Theme JSPs are responsible for the header section, using Head.jsp by default.


Parent Tags used by the portal theme JSPs