<?xml version="1.0"?>

<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->

<document>

    <properties>
        <title>Using Properties</title>
        <projectfile>xdocs/project.xml</projectfile>
        <subprojectfile>xdocs/config.project.xml</subprojectfile>
    </properties>

    <body>

    <section name="Configuration using Properties">
        <p>
            VelocityTools 2 can be configured using a properties file.  
            Here's the same configuration as the 
            <a href="config.xml.html">XML</a> and
            <a href="config.java.html">Java</a> examples
            in the properties format:
        </p>

        <sourcecode>
tools.toolbox = request,session,application

tools.request.property.xhtml = true
tools.request.toytool = ToyTool
tools.request.toytool.restrictTo = index.vm
tools.request.custom = org.mine.CustomTool
tools.request.custom.randomProperty = whatever

tools.session.property.create-session = true
tools.session.property.create-session.type = boolean
tools.session.map = java.util.HashMap

tools.application.date = org.apache.velocity.tools.generic.DateTool

tools.data.version = 1.1
tools.data.version.type = number
tools.data.date = Mon Sep 17 10:08:03 PDT 2007
tools.data.date.class = java.util.Date
tools.data.date.converter = org.apache.commons.beanutils.locale.converters.DateLocaleConverter
tools.data.isSimple = true
tools.data.type = boolean
tools.data.foo = this is foo.
tools.data.bar = this is bar.
tools.data.dataKeys = version,date,isSimple.foo,bar,dataKeys,switches
tools.data.dataKeys.type = list
tools.data.switches = true,false,false,true
tools.data.switches.type = list.boolean
        </sourcecode>

    </section>

    </body>

</document>
