Tomcat Installation

If it is not done yet, download the latest release from apache tomcat website.

Uncompress the archive inside a folder of your choice.

Using a text editor, open the file context.xml in conf/ folder.

Add a jdbc connection to your database. It sould look like this:

<Resource name="jdbc/aegaeon"
      auth="Container"
      type="javax.sql.DataSource"
      factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
      username="aegaeon_server"
      password="password"
      driverClassName="com.mysql.cj.jdbc.Driver"
      url="jdbc:mysql://localhost:3306/aegaeon_db"/>

The resource above use MySQL driver. If you are using PostgreSQL, you will need to use a different driver. This is a very minimal jdbc connection setup. I highly recommend to check tomcat's connection pool documentation to setup the maximum number of connections and other important properties of your database connection.