Is DB needed for Tomcat Server

When i am doing Devops basic course i can see two tier application setup using LAMP model where i configured apache server with the database mariadb.

My question is do we also should use database for tomcat server in production environment? I am just asking from best practices standpoint.

If yes then can you please share some document how can i achieve this.

tomcat itself does not require a database. It is simply a module for Apache that supports the running of Java web applications.

Any database is a requirement of the Java app that is running in tomcat, so if the application has no database, then no database.

If you are referring to “KodeKloud e-commerce application” in devops prerequisite course, this isn’t using tomcat at all! That is a PHP application, and PHP comes with its own module for apache (which is installed when you follow the demo)

Again, the database belongs to the application (e-commerce), not the apache plugin for php.