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:".
Documentation for the 'cms:contentcheck' tag
This tag checks the availablity of an XML content item for conditional display
Documentation for the 'cms:conteninfo' tag
This tag provides access to the result set of a contentload
Documentation for the 'cms:contentload' tag
This tag provides access to read xml content items
Documentation for the 'cms:contentloop' tag
This tag provides access to loop through the element values of an xml content item
Documentation for the 'cms:contentshow' tag
This tag provides access and displays XML content item information
Documentation for the 'cms:decorate' tag
This tag provides decoration of HTML content
Test for the 'cms:decorate' tag
Example JSP page showing how to use the 'cms:decoration' tag.
Documentation for the 'cms:editable' tag
This tag enables the direct edit feature in a page.
Documentation for the 'cms:img' tag
This tag supports image scaling using the OpenCms native image scaling mechanism.
A test demonstrating the scale options of the 'cms:img' tag.
Documentation for the 'cms:include' tag
This tag includes other JSP elements dynamically at runtime.
Test for the 'cms:include' tag
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.
Test for the 'cms:include' tag with parameters
This test shows how to pass parameters to included JSP sub-elements.
Documentation for the 'cms:info' tag
This tag prints various runtime information of your system.
A test to print all runtime information available by the 'cms:info' tag
Documentation for the 'cms:label' 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.
Documentation for the 'cms:link' tag
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.
Documentation for the 'cms:property' tag
This tag provides access to read the properties of the current file.
Test for the 'cms:property' tag
A test reading various file properties from different files in the OpenCms VFS.
Documentation for the 'cms:template' tag
This tag splits a JSP page into elements to be included by the 'cms:include' tag
Test for the 'cms:template' tag
Example JSP page showing how to include elements from another JSP page.
Documentation for the 'cms:user' tag
This tag provides access to read the properties of the current user.
A test displaying various properties of the currently logged in user.