How to use the OpenCms JSP Taglib
In order to use the OpenCms JSP taglib, you must insert the "taglib" directive in your JSP page to specify where the OpenCms taglib definition can be found. This is done by including the following line in the beginning of your JSP:
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
This directive must be set before any cms tags are used. If used like shown in the example, the prefix "cms" is unique for the OpenCms Taglib. In our examples, all tags of the OpenCms taglib start with the prefix "cms:".
This tag checks the availablity of an XML content item for conditional display
This tag provides access to the result set of a contentload
This tag provides access to read xml content items
This tag provides access to loop through the element values of an xml content item
This tag provides access and displays XML content item information
This tag provides decoration of HTML content
Example JSP page showing how to use the 'cms:decoration' tag.
This tag enables the direct edit feature in a page.
This tag supports image scaling using the OpenCms native image scaling mechanism.
A test demonstrating the scale options of the 'cms:img' tag.
This tag includes other JSP elements dynamically at runtime.
This very important tag allows you to include sub-elements on a page. These sub-elements can be cached, please see the FlexCache documentation for more details.
This test shows how to pass parameters to included JSP sub-elements.
This tag prints various runtime information of your system.
A test to print all runtime information available by the 'cms:info' tag
This tag provides access to read the localized strings from the OpenCms workplace Java resource bundles.
This tag can read out values from the OpenCms Workplace Java resource bundles. This can be used in case you want to build Workplace extensions and intend to make them language independent.
This tag acts as a wrapper to build a valid OpenCms URL for a given resource.
This test uses the 'cms:link' tag to get some link substitutions for different files. This tag is required in case you want to use the static export.
This tag provides access to read the properties of the current file.
A test reading various file properties from different files in the OpenCms VFS.
This tag splits a JSP page into elements to be included by the 'cms:include' tag
Example JSP page showing how to include elements from another JSP page.
This tag provides access to read the properties of the current user.
A test displaying various properties of the currently logged in user.