Deployment as WAR / in Tomcat (tC)

Container deployment recommended see https://kgs-software.atlassian.net/wiki/spaces/DOCUEN/pages/2564489217

Prerequisites

https://kgs-software.atlassian.net/wiki/spaces/DOCUEN/pages/20348944

 

The WAR packages can be deployed on an application web server like Tomcat, Jetty, JBoss or GlassFish. It is required, that the correct Versions of Java JDK Version and application web server are already set up before installing the tia Core application.
Currently Java 11 with Tomcat 9 is recommended. When deploying using Java 17 with Tomcat please see https://kgs-software.atlassian.net/wiki/spaces/DOCUEN/pages/2567372985/Using+KGS+JavaEE+WebApps+in+Tomcat+10..

The tia® Content Server core versions beginning with end of September 2023 will include breaking changes and can only be deployed using Java JDK 17. These web applications require an application web server supporting Jakarta Servlet 5.0 (Tomcat 10+).

Installation of tia® Content Server core

Java and Tomcat need to be pre-installed and tia® Content Server core needs to be downloaded. The following steps will show you how to deploy our software.

Step 1:

Open the Tomcat configuration page and go to “Manager App”.

Step 2:

Choose the war-file of the tia® Content Server core application and deploy it into the tomcat.

After this step the tomcat should create a folder in its webapps directory as well show the app in the application section of the manager.

 

Verify Installation

Choose the deployed war-file from tomcat manager:

 

Now the serverinfo is shown with the preconfigured repository:

Configure config location

  • shut down the app

  • enter tomcat web app folder

  • edit there …/WEB-INF/web.xml

  • configure the folder and file name for your repository.cfg

During the deployment the WAR file will be extracted and the default configuration will be available at /WEB-INF/classes/config/repository.cfg . In the web.xml the location of repository.cfg can be changed.

The folder and file for repository.cfg as well as the key store configuration needs to be readable by tomcat process. Don’t put these configuration inside an user folder of another user like your login user! Otherwise the app inside tomcat don’t have access permissions and will not start.

Example configuration in web.xml:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <context-param> <param-name>configDirectory</param-name> <param-value>/opt/kgs/coreOfTia/configs/test</param-value> </context-param> <context-param> <param-name>configFile</param-name> <param-value>repository.cfg</param-value> </context-param> </web-app>
  • start the app again

  • The base URL of the deployed application should forward to the web console, which looks like this: