Cernunnos Manual


<properties>

Description:

Reads the properties file specified by LOCATION and registers its contents as request attributes visible to SUBTASKS.

Reagents:

Name XPath Description Reagent Type Expected Type Required
CONTEXT @context Optional context from which missing elements of the LOCATION will be inferred if it is relative. The default is the value of the 'Attributes.ORIGIN' request attribute. PHRASE java.lang.String No
LOCATION @location Optional location of a resource; if omitted, the value of the 'Attributes.LOCATION' request attribute will be used. LOCATION may be a filesystem path or a URL, and may be absolute or relative; if a relative value is provided, it will be resolved based on the value of CONTEXT. PHRASE java.lang.String No
SUBTASKS * The set of tasks that are children of this task. NODE_LIST java.util.List No

Examples:

Reads database connection information from a properties file, makes a connection, writes each name from the 'users' table to the screen:

 
       
        <properties location="build/WEB-INF/classes/properties/rdbm.properties"> 
          <sql-connection driver="${req(jdbcDriver)}" password="${req(jdbcPassword)}" url="${req(jdbcUrl)}" username="${req(jdbcUser)}"> 
            <sql-query> 
              <sql>SELECT user_name FROM users</sql>  
              <subtasks> 
                <echo>${req(1)},</echo> 
              </subtasks> 
            </sql-query> 
          </sql-connection> 
        </properties>