<< Back - Alkacon logo

OpenCms 6.0 interactive documentation:

OpenCms JSP taglib documentation

OpenCms logo - Forward >>

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:".

file Documentation for the 'cms:user' tag

This tag provides access to read the properties of the current user.

file Test for the 'cms:user' tag

A test displaying various properties of the currently logged in user.

file Documentation for the 'cms:property' tag

This tag provides access to read the properties of the current file.

file Test for the 'cms:property' tag

A test reading various file properties from different files in the OpenCms VFS.

file Documentation for the 'cms:link' tag

This tag acts as a wrapper to build a valid OpenCms URL for a given resource.

file Test for the 'cms:link' tag

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.

file Documentation for the 'cms:label' tag

This tag provides access to read the localized strings from the OpenCms workplace Java resource bundles.

file Test for the 'cms:label' tag

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.

file Documentation for the 'cms:include' tag

This tag includes other JSP elements dynamically at runtime.

file 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.

file Test for the 'cms:include' tag with parameters

This test shows how to pass parameters to included JSP sub-elements.

file Documentation for the 'cms:template' tag

This tag splits a JSP page into elements to be included by the 'cms:include' tag

file Test for the 'cms:template' tag

Example JSP page showing how to include elements from another JSP page.

file JSP page with two simple template elements

The elements in this JSP page are included by test_tag_template.jsp

file Documentation for the 'cms:info' tag

This tag prints various runtime information of your system.

file Test for the 'cms:info' tag

A test to print all runtime information available by the 'cms:info' tag

file Documentation for the 'cms:contentcheck' tag

This tag checks the availablity of an XML content item for conditional display

file Documentation for the 'cms:contentload' tag

This tag provides access to read xml content items

file Documentation for the 'cms:contentloop' tag

This tag provides access to loop through the element values of an xml content item

file Documentation for the 'cms:contentshow' tag

This tag provides access and displays XML content item information

©2003-2005 Alkacon Software (http://www.alkacon.com) - The OpenCms experts