Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/webjetcms/webjetcms/llms.txt

Use this file to discover all available pages before exploring further.

WebJET CMS is configured primarily through the admin panel at Settings → Configuration. Some settings — such as database credentials or cluster node identity — must be set before the application starts. This page covers the key configuration areas.

Database connection (poolman.xml)

The database connection is defined in WEB-INF/classes/poolman.xml (or src/main/resources/poolman.xml in a Gradle project). The connection named iwcm is used by WebJET for its own tables.
<?xml version="1.0" encoding="UTF-8"?>
<poolman>
    <datasource>
        <dbname>iwcm</dbname>
        <driver>org.mariadb.jdbc.Driver</driver>
        <url>jdbc:mariadb://db-server/schema-name</url>
        <username>db-user</username>
        <password>db-password</password>
        <minimumSize>0</minimumSize>
        <maximumSize>50</maximumSize>
    </datasource>
</poolman>

Connection pool options

ElementDefaultDescription
minimumSize0Minimum number of always-open connections
maximumSize50Maximum number of open connections
autoCommitfalseSet true to enable auto-commit on every statement
readOnlyfalseSet true for read-only connections
connectionTimeout300Seconds before a connection is considered leaked
testQuerySQL to test connection health. Set to true for SELECT 1
hikariPropertiesAdditional HikariCP properties in key=value format
Example with extended pool settings:
<datasource>
    <dbname>iwcm</dbname>
    <driver>org.mariadb.jdbc.Driver</driver>
    <url>jdbc:mariadb://db-server/schema-name</url>
    <username>db-user</username>
    <password>db-password</password>
    <minimumSize>0</minimumSize>
    <maximumSize>60</maximumSize>
    <hikariProperties>
        maxLifetime=600000
        connectionTestQuery=SELECT 1
    </hikariProperties>
</datasource>

SMTP email settings

Set these configuration variables in Settings → Configuration to enable outgoing email:
VariableDescription
smtpServerSMTP server hostname
smtpPortSMTP port (e.g. 587 for TLS)
smtpUserSMTP login name
smtpPasswordSMTP password
smtpUseSSLSet to true to enable SSL
smtpUseTLSSet to true to enable TLS (required for port 587)
smtpTLSVersionTLS version for the SMTP connection
smtpAuthMechanismAuth mechanism (e.g. NTLM, XOAUTH2). Leave empty for the JavaMail default
emailProtectionSenderEmailSender address used in FROM for all emails when the SMTP server is not open relay (e.g. noreply@example.com). The original FROM value is moved to REPLY-TO
defaultSenderNameDisplay name for the sender
defaultSenderEmailDefault sender address
useSMTPServerSet to false to disable email sending (useful on cluster nodes without SMTP access)
smtpConnectionTimeoutMillisMilliseconds to wait for SMTP connection

Amazon SES via SMTP

smtpServer=email-smtp.eu-west-1.amazonaws.com
smtpPort=587
smtpUser=<SES SMTP username>
smtpPassword=<SES SMTP password>
smtpUseTLS=true
After setting up SES, verify in email headers that messages are actually sent via Amazon SES. Also verify the domain identity and set DKIM keys in the SES console.

Per-module sender addresses

You can override defaultSenderEmail for individual modules by using a prefix. For example, reservationDefaultSenderEmail overrides the sender address for booking confirmations. Available prefixes:
  • dmail — bulk email
  • formmail — form submission notifications
  • reservation — booking approvals/denials
  • passwordReset — password reset emails

Logging

WebJET CMS uses Logback for logging. The configuration file is at WEB-INF/classes/logback.xml. For quick adjustments without editing the XML file, use these configuration variables:
VariableDescription
logLevelBase log level: debug for detailed output, normal for production
logLevelsPer-package log levels, one per line, in package=LEVEL format
Example logLevels value:
sk.iway=DEBUG
sk.iway.iwcm=WARN
org.springframework=WARN
A minimal logback.xml for a new project:
<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>[%X{installName}][%c{1}][%p][%X{userId}] %d{yyyy-MM-dd HH:mm:ss} - %msg%n</pattern>
        </encoder>
    </appender>
    <appender name="IN_MEMORY" class="sk.iway.iwcm.system.logging.InMemoryLoggerAppender" />
    <root level="ERROR">
        <appender-ref ref="STDOUT" />
        <appender-ref ref="IN_MEMORY" />
    </root>
    <logger level="INFO" name="sk.iway"/>
</configuration>

Cluster configuration

When running multiple WebJET nodes, the cluster must be configured so nodes can synchronize their in-memory caches.

Auto mode

The simplest setup. Set clusterNames to auto and restart:
clusterNames=auto
WebJET uses the server’s HOSTNAME environment variable (or the host’s resolved name/IP) as the node name, truncated to 16 characters.
If your infrastructure (e.g. Kubernetes) appends a random suffix to hostnames, set clusterHostnameTrimFromEnd=true to use the last 16 characters instead.

Explicit node list

For a stable, known set of nodes:
clusterNames=node1,node2,node3
Set each node’s ID via a JVM parameter (see external configuration):
JAVA_OPTS="$JAVA_OPTS -DwebjetNodeId=1"

Cluster variables

VariableDefaultDescription
clusterRefreshTimeout5000 msCache sync interval. Use 60000 ms (1 min) in production to reduce load
clusterMyNodeTypefullfull = admin + public, public = public only
senderRunOnNodeComma-separated list of nodes that trigger bulk email sending

External configuration

You can override any configuration variable without touching the admin panel, using JVM system properties or OS environment variables. This is especially useful for:
  • Different settings per environment (dev, staging, production)
  • Keeping secrets out of the database
  • Per-node cluster configuration

JVM system properties (-D flags)

Prefix the variable name with webjet. and set it via JAVA_OPTS:
# Linux: /etc/default/tomcat or /etc/conf.d/tomcat
JAVA_OPTS="$JAVA_OPTS -Dwebjet.smtpServer=mail.example.com"
JAVA_OPTS="$JAVA_OPTS -Dwebjet.logLevel=debug"
JAVA_OPTS="$JAVA_OPTS -DwebjetNodeId=2"
On Windows, add these lines to the Java Options text area in the Configure Tomcat application.
webjetNodeId does not use the webjet. prefix. Setting it configures clusterMyNodeName to nodeX and pkeyGenOffset to X.

Environment variables

Use a webjet_ prefix (underscore instead of period, since . is not valid in env var names):
export webjet_smtpServer=mail.example.com
export webjet_logLevel=debug
export webjetNodeId=2
Environment variables are recommended for containerized deployments because they can be injected by the container runtime.

Tomcat context parameters

Set variables per virtual host in server.xml:
<Host name="mysite.example.com" appBase="webapps" unpackWARs="false" autoDeploy="false">
    <Context path="" docBase="../webapps/webjet" reloadable="false" swallowOutput="true">
        <Resources allowLinking="true" />
        <Parameter name="webjet_logLevel" value="normal" override="true"/>
    </Context>
</Host>

Setting an empty value

To explicitly clear a variable (override a non-empty database value with an empty string), set the value to -:
JAVA_OPTS="$JAVA_OPTS -Dwebjet.smtpServer=-"

External database credentials

Database connection parameters can also come from system or environment variables, so you don’t have to store passwords in poolman.xml:
<!-- poolman.xml with empty values -->
<poolman>
    <datasource>
        <dbname>iwcm</dbname>
        <driver></driver>
        <url></url>
        <username></username>
        <password></password>
    </datasource>
</poolman>
Then set the values externally:
VariableDescription
webjetDbDriverJDBC driver class
webjetDbUrlJDBC connection URL
webjetDbUserNameDatabase username
webjetDbPasswordDatabase password
webjetDbMinimumSizeMinimum pool size
webjetDbMaximumSizeMaximum pool size
To use a completely different poolman.xml file (for example on a staging environment), set:
JAVA_OPTS="$JAVA_OPTS -DwebjetPoolmanPath=/poolman-staging.xml"
WebJET looks for the file first as an absolute path on disk, then relative to WEB-INF/classes/.

Key admin panel variables

The following variables are configured in Settings → Configuration in the admin panel:
VariableDescription
serverBeyoundProxySet to true when WebJET runs behind a reverse proxy or load balancer. WebJET reads visitor IP from x-forwarded-for and protocol from x-forwarded-proto
webEnabledIPsComma-separated list of IP prefixes allowed to access the public site
adminEnabledIPsComma-separated list of IP prefixes allowed to access the admin panel
cloudStaticFilesDirPath to the external static files directory
enableStaticFilesExternalDirEnable or disable the external static files directory
amchartLicenseLicense key for amCharts charts (removes the amCharts logo)