Show TOC

Background documentationTag Libs Locate this document in the navigation structure

 

JSP pages in the portal can use custom tag libs by doing the following:

  • Package the class files that implement the tag lib in the lib or classes directory of the PAR file's PORTAL-INF folder.

  • Add a directive to any JSP file that references the tag lib's .tld file, as follows:

Syntax Syntax

  1. <%@ taglib uri="<uri>" prefix="<prefix>" %>
End of the code.

The following shows the possible formats for the uri attribute above:

URI

Description

Path of .tld file

The path to the tag lib's .tld file, relative to the JSP file.

Alias to .tld file.

The alias can be provided with the prefix prt:taglib:

An alias for the path to the .tld file is defined by a <property> element in the <component-profile> element.

The value of the property is provided with the following format:

/SERVICE/<portal app>/<path to .tld file>

where the path to the .tld file is relative to the folder that contains the portal application's public Web resources.

For example, an alias for the portal's HTMLB tag lib must point to: /SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld