<< Back - Alkacon logo

OpenCms 6.0 interactive documentation:

Show source

OpenCms logo - Forward >>

Source code for: /alkacon-documentation/examples_flex_2/readproperties.jsp


<%@ page session="false" import="org.opencms.jsp.*,java.util.*" %><% 
 
// Create a CmsJspActionElement
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response);
    
// Get all properties of the file
Map properties = cms.getCmsObject().readProperties(cms.getRequestContext().getUri(), true);

// Check for the template
String template = (String)properties.get("template");

// Insert the template head 
cms.include(template, "head"); 
%>

<h3>All Properties of this file and it's parent folders:</h3>

<ul>
<%
Iterator i = properties.keySet().iterator();

while (i.hasNext()) {
	String key = (String)i.next();
	String value = (String)properties.get(key);
	out.println("<li><i>" + key + ":</i><br>" + value + "<br>&nbsp;");
}

%>
</ul>

<%
// Insert the template foot
cms.include(template, "foot"); 
%>

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