O'Reilly logo

Managing and Customizing OpenCms 6 by Matt Butcher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JSP Tags

JSP tags look similar to HTML or XML tags. But when a client requests a JSP document, the server reads through the document in search of JSP tags. When it finds a tag, it executes the required code and inserts the results generated into the copy of the document that it will send to the client.

Tags are organized into tag libraries (taglibs). OpenCms provides a tag library that contains useful tags for working with OpenCms. These tags can be used to access or modify contents in OpenCms.

The following example will clarify how JSP tags and JSP tag libraries work in practice:

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<html>
<head>
<title>Show User’s First Name</title>
<head>
<body>
<p>
<b>User’s First Name:

<cms:user ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required