<< Back - Alkacon logo

OpenCms 6.0 interactive documentation:

Documentation for the info() method

OpenCms logo - Forward >>

The info() method

This method prints various runtime information about OpenCms and the underlying Java/servlet/OS environment.

Other property values than OpenCms that are passed to the tag are routed to a standard System.getProperty(value) call, so you can also get information about the Java VM environment, using values like java.vm.version or os.name.

If the given property value does not match a key from the special OpenCms values and also not the system values, a (String) message is returned with a formatted error message.

Parameters:

Name Description
java.lang.String property Specifies which runtime information should be printed. The following properties are currently supported:
  • "opencms.version": show the OpenCms version
  • "opencms.url": show the URL to the current file
  • "opencms.uri": show the URI to the current file
  • "opencms.webapp": the name of the web application
  • "opencms.webbasepath": absolute path to the web application
  • "opencms.request.uri": the OpenCms request URI of the current file
  • "opencms.request.element.uri": the OpenCms request URI of the current element
  • "opencms.request.folder": the OpenCms request folder

Here are some examples for system properties which are routed to the System.getProperty(value) call

  • "java.vm.name": name of the used Java VM
  • "java.vm.version": version of the used Java VM
  • "java.vm.info": information on Java VM
  • "java.vm.vendor": vendor of Java VM
  • "os.name": name of the current operating system
  • "os.version": version of the OS
  • "os.arch": architecture of the OS

Example usage:

Print the OpenCms version:

org.opencms.jsp.CmsJspActionElement cms = new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);

out.println(cms.property("opencms.version"));

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