#
# Test the sql template
# This requires the test mysql database to be configured properly
# These database connectors (or equivalent) should be on your classpath):
#   mysql-connector-java-5.1.8-bin.jar
#   ojdbc6.jar
#
log=5
port=5555

handler=main
main.class=sunlabs.brazil.server.ChainHandler
main.handlers=map template

# Map all URL requests to our page

map.class=sunlabs.brazil.handler.UrlMapperHandler
map.match=/*
map.replace=/sql.html

# Set up the sql stuff

template.class=sunlabs.brazil.template.TemplateHandler
template.templates= set bsl sql

set.class=sunlabs.brazil.template.SetTemplate
set.query=query.

bsl.class=sunlabs.brazil.template.BSLTemplate 

# set up two "static " database url's

sql.class=sunlabs.brazil.sql.SqlTemplate
sql.drivers=oracle.jdbc.OracleDriver com.mysql.jdbc.Driver
sql.databases=mysql oracle

mysql.url=jdbc:mysql://myhost.com/mydatabase?user=suhler&password=XXXXX

# the sample web page doesn't use this one
oracle.url=jdbc:oracle:thin:@myhost.com:1521:mydatabase
oracle.user=suhler
oracle.passwd=XXXXXX

# if additional parameters need to be passed to the database...
# sql.sqlPrefix=extra1 extra2 ...
#  extra1.name=...
#  extra1.value=...
#  extra2.name=...
#  extra2.value=...

# The markup can use either preconfigured databases via their "tokens",
# or fully qualified jdbc URL's:
#  <sql database=mysql ...> sql here </sql>
#  <sql database=oracle ...> sql here </sql>
#  <sql
#    database=jdbc:mysql://anotherhost.com/anotherdatabase...
#    user=...  passwd=...
#  > sql here </sql>
