Login | About | Page IndexHome | Manual | Publications | Download | Support

App Configuration

In the application.ini file compile-, database- and deployment information is stored. Executing the webdsl command in a certain directory will look for a application.ini file to obtain compilation information. If no such file was found, it will start a simple wizard to create one.

Example application.ini:

backend=servlet
tomcatpath=/opt/tomcat
appname=hello
dbserver=localhost
dbuser=webdsluser
dbpassword=webdslpassword
dbname=webdsldb
dbmode=update
smtphost=localhost
smtpport=25
smtpuser=
smtppass=

Required Configuration

BACKEND The back-end target platform of the application. Currently, the servlet back-end is only up-to-date.

APPNAME The name of the application to compile. The compiler will look for a APPNAME.app file to compile. This name will also become the servlet name and show up as part of the URL. By renaming the generated APPNAME.war file to ROOT.war and then deploying it, the application name will not be in the URL.

TOMCATPATH This field should contain the root directory of the Tomcat installation. For example /opt/tomcat. It is used when executing 'webdsl deploy'.

Database Configuration MySQL

DBMODE This field indicates if the application should try to create tables in a database, or try to sync it with the existing schema to avoid loss of data. Valid values are create-drop, update, and false. Update can lead to unpredictable results if data model is changed too much, if data needs to be properly migrated, use Acoda instead. For production deployment use 'export DBMODE=false'.

DBSERVER Location of the Mysql server, which will be used in the connection URL, e.g. 'localhost'.

DBUSER User to be used for connecting to the MySQL database.

DBPASSWORD Password for the specified user.

DBNAME Database name, note that the database needs to exist when the application is run. The 'webdsl' script will try to create the database in the wizard, but manually creating it via command-line or MySQL Administrator is also possible.

Database Configuration Sqlite

DB Set 'db=sqlite' to enable Sqlite instead of the default MySQL.

DBFILE Sqlite database file, an empty file will be populated with tables automatically, when using 'create-drop' or 'update' db modes.

DBMODE Same as for MySQL.

Email Configuration

SMTPHOST SMTP host for sending email, e.g. smtp.gmail.com

SMTPPORT SMTP port for sending email, e.g. 465

SMTPUSER SMTP username

SMTPPASS SMTP password

SMTPSSL use SSL (true/false), currently this option is not used

SMTPTLS use TLS (true/false), currently this option is not used

Optional Configuration

ROOTAPP 'rootapp=true' will deploy the application as root application, it will not have the application name prefix in the URL.

SESSIONTIMEOUT Sets the session timeout, specified in minutes.

DEBUG 'debug=true' will show queries and Java exception stacktraces in the log.

VERBOSE 'verbose=2' will show more info during compilation, mainly for developers.

FASTPP 'fastpp=true' will make the compiler write Java code faster (writing files stage), however, it also becomes less readable.

Deploy with Tomcat Manager

For the 'webdsl tomcatdeploy' and 'webdsl tomcatundeploy' commands to work, a user has to be configured in Tomcat (tomcat/conf/tomcat-users.xml). For example:

<tomcat-users>
  <role rolename="manager"/>
  <user username="tomcat" password="tomcat" roles="manager"/>
</tomcat-users>

The tomcat manager URL and username and password can be set in the application.ini file (defaults are listed as examples):

TOMCATMANAGER 'tomcatmanager=http:\localhost:8080\manager' URL to Tomcat manager

TOMCATUSER 'tomcatuser=tomcat' manager user declared in tomcat/conf/tomcat-users.xml

TOMCATPASSWORD 'tomcatpassword=tomcat' password for that user


powered by WebDSL