Helma Logo
main list history
previous version  overview  next version

Version 3 by hannes on 19. February 2009, 12:13

<small><b>Description</b></small><h4>Description</h4>

This file is located in an application's code repository (e.g. <tt>apps/myApp/</tt> or <tt>apps/myApp/code/</tt>, depending on your setup). A wide variety of properties can be defined here. Generally, any imaginable name can be used as a property and assigned a string value the way

<tt><i>propertyName = propertyValue</i></tt>

Properties defined in such a way can be evaluated from inside Helma's scripting environment by using the <tt>getProperty()</tt> function.

Several application specific settings can be controlled trough pre-defined properties. See the *server and application properties list|Server and Application Properties* for a complete overview.

Many of those pre-defined properties also can be defined server-wide in <tt>*server.properties*</tt>. However, any property that is set there will be overwritten by an appropriate setting in <tt>app.properties</tt>.

<small><b>Example</b></small><h4>Example</h4>

<tt># Setting some properties:
backgroundColor = #3333ff
title = "Hello, World!"</tt>

Accessing the properties e.g. from <tt>root/main.hac</tt>:
<tt>var bgColor = getProperty("backgroundColor");
res.write(bgColor);
<i>#3333ff</i>

var title = getProperty("title");
res.write(title);
<i>Hello, World!</i></tt>

     removed
     added