<render:jspUri> Tag

This tag retrieves the location of the JSP in which the tag is used. This helps create correct relative URLs to resources such as images. The URL omits the JSP filename.

The tag is identical to <render:getjspUri> and is provided here for the sake of backward compatibility.

Note: If you use this tag in a JSP that is used in a struts or Java Page Flow application, in order for the URI to resolve correctly, Java Page Flow support must be enabled in the portal Web project's WEB-INF/netuix-config.xml file, as shown in the following example. Notice the <enable> element is set to true.

<!-- Enable or disable Pageflow support -->
<pageflow>
    <enable>true</enable>
</pageflow>

Syntax

<tagName attribute="value">
</tagName>

Attributes

id

Optional (String) - The name of the variable to store the JSPs URL.

webAppQualified

Optional (Boolean) - If set to "true," the name of the portal Web project is appended to the URL. This is important for resources such as images that require a Web application-qualified URL. For example, /sampleportal/images/logo.gif. If set to "false," the URL is created relative to the portal Web application.

Example

<render:getJspUri id="loginPortletsUri"/>
<% String pathToLogoutJsp = loginPortletsUri + "formLogin/logout.jsp"; %>
<render:resourceUrl path="<%=pathToLogoutJsp%>"/>      

Related Topics