[opencms-dev] How to use a JSP template on a JSP page with editable elements?

Vitor Varalonga varalonga at gmail.com
Wed Nov 9 13:23:07 CET 2005


I'm having some problems including a JSP template, so I was wondering if some
kind expert could lean a helping hand to this OpenCMS beginner. :)
I've created a JSP template like this:

<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<cms:template element="head">
<cms:template element="body">
       <cms:include element="body" editable="true"/>
<cms:template element="foot">

I was having problems in rendering a xmlpage type page, but then I
realized that the related <element> tag on the ControlCode had a wrong value
other than "body" on the "name" attribute. By fixing this the page displayed
correctly and featured the direct edit functionality.
The problem is that I'm trying to accomplish the same with JSP pages instead
of standard pages, but even though the content is displayed correctly,
the direct
edit functionality is not available. I suppose I have to indicate/mark
the block that
stands for the "body" element. How can I achieve this?
Here is an example of a test JSP (in this case "Dummy test!!!" should
be the content
of the "body" element):

<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<cms:include property="template" element="head"/>

Dummy test!!!

<cms:include property="template" element="foot"/>

thanks in advance,

Vitor Varalonga

More information about the opencms-dev mailing list