JSP tags for JSR 168 Portlets


The JSR 168 portlet API defines several tags that can be used in portlet JSPs to get access to the portlet request and response and to generate URLs. To make these tags available in a JSP, the following directive is required at the beginning of the JSP:

   <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

For more information on these tags, see the Java Portlet Specification.

WebSphere Portal provides an additional tag for use in JSR 168 portlets. To make these tags available in a JSP, the following directive is required:

   <%@ taglib uri="/WEB-INF/tld/ibm-portlet-ext.tld" prefix="portletExt" %>

The following is a brief description of the extension to the JSR 168 portlet JSP tag library.

<portletAPI:bidi dir="rtl|ltr" />

This tag is used to support text for bidirectional languages. Bidirectional languages are those which are typically read from right to left except when left-to-right text strings are displayed (for example, URLs, code samples, or directory and file names).

dir

Indicates the normal direction of text in the language.
  • For dir="rtl", the tag content is written only if the client's locale belongs to a bidirectional language. This is the default setting if dir is not specified.
  • For dir="ltr", the tag content is written only if the client's locale does not belong to a bidirectional language.

locale

The tag content is written only if the language belongs to the bidirectional languages defined in LocalizerService.properties .

 

You can also use JSTL tags as described in Using JSTL in portlet JSPs.

 

See also

Home |

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.