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

A Short Scriptlet

The following scriptlet fetches the navigation information from OpenCms and then prints it out. This cannot be done with JSP tags. Otherwise, we would create our navigation that way.

If you are not a Java programmer, you can feel free to skip this section, or you may want to copy the code and use it in your own applications. After the code, there will be a brief explanation.

The contents of the file look like this:

<%@ page session="false" import="java.util.Iterator, java.util.List, org.opencms.jsp.CmsJspNavBuilder, org.opencms.jsp.CmsJspNavElement, org.opencms.jsp.CmsJspActionElement" %> <% /* * Provides basic site navigation. */ // Create the class from which we will get navigation. CmsJspActionElement cms = new CmsJspActionElement( ...

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