Deploy as a WAR in Tomcat - Documentation topics on: dotcms war,ejb,j2ee,tomcat,war,.

Deploy as a WAR in Tomcat

The following steps should be performed to install dotCMS as a WAR file in Tomcat.


  • Before following these steps which are specific to this application server, please read and follow all the steps in the WAR Installation documentation.
  • Please see the dotCMS Installation Requirements document to ensure your version of Tomcat is supported by dotCMS.

Installation Steps

1. Copy mail.jar and JDBC driver jar files into your application server lib folder (apache-tomcat-X.x.xx/lib)

These files can be found in the Tomcat lib folder in your dotCMS distribution (/dotserver/tomcat-X.x.xx/lib), and need to be copied into the lib folder of the Tomcat distribution where you will install your dotCMS WAR file.

The mail.jar file name is straight-forward:


You must copy the appropriate JDBC jar file for the database you plan to use:

DatabaseJDBC Jar
MS SQL ServersqljdbcXX.jar

Note: Make sure that the configuration of your context.xml file matches the JDBC jar file you've chosen.

2. Delete all files and directories in your Tomcat ROOT directory (apache-tomcat-X.x.xx/webapps/ROOT).

3. Unzip the dotcms.war file.

4. Copy the extracted directory into your Tomcat ROOT directory (apache-tomcat-X.x.xx/webapps/ROOT).

5. Configure and copy the context.xml file into your Tomcat ROOT/META-INF folder (apache-tomcat-X.x.xx/webapps/ROOT/META-INF).

For information on how to configure the context.xml file, please see the Database Configuration documentation.

6. Create a setenv batch file in your Tomcat bin folder (**/dotserver/apache-tomcat-X.x.xx/bin/**) as follows:

Linux: Create a file named containing the following lines:

#debug options
CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true -Xverify:none -Dfile.encoding=UTF8 -server -Xmx4G -XX:MaxPermSize=512m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC"
# jamm jar options
#CATALINA_OPTS="$CATALINA_OPTS -javaagent:/xxxxxxx/apache-tomcat-8.0.18/webapps/ROOT/WEB-INF/lib/dot.jamm-0.2.5_1.jar"

Windows: Create a file named setenv.bat containing the following lines:

rem debug options
set "CATALINA_OPTS=%CATALINA_OPTS% -Djava.awt.headless=true -Xverify:none -Dfile.encoding=UTF8 -server -Xmx4G -XX:MaxPermSize=512m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC"
rem jamm jar options
rem set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:/xxxxxxx/apache-tomcat-8.0.18/webapps/ROOT/WEB-INF/lib/dot.jamm-0.2.5_1.jar"

Note: If appropriate, change the version number and/or folder name of the Tomcat folder in the above commands.

7. Deploy the dotCMS WAR file.

For more information on installing dotCMS as a WAR file, please see the WAR Installation documentation.