ApacheTomcat - dejanu/linux GitHub Wiki

  1. open-source Java Servlet Container where Catalina is Tomcat's servlet container ( component of a web server that interacts with Java servlets.). A Java servlet is a Java software component that extends the capabilities of a server (implementing Java classes that respond to requests).

• catalina.policy: This file describes the security policy permissions for Tomcat 7. It enforces the security policy permissions by JVM on the web application.When catalina is executed with the -security option, the security policy mentioned in the catalina file is used and the web application security policy also gets executed.

catalina.properties: This file contains the shared definition of the server, shared loader, and JARs, which need to be scanned at the time of the server startup.

server.xml: This is one of the important configuration files of Tomcat. It holds critical information, such as the IP address, port, virtual host, context path, and so on.

When the server gets the request with the URL, it will check the server.xml or context path for the defined URL. If it's found, then the URL will be served from here, otherwise the server has to search all the deployed WAR files. Hence, the context path reduces the CPU cycle.

tomcat-users.xml: This file is used for authentication, authorization, and role-based definitions. It is used to implement a database of users/ passwords/roles for authentication and container-managed security. To add/remove users or assign/unassign roles to existing users, edit this file.

logging.properties: As the name suggests, it defines the logging . properties of the Tomcat instances (such as startup logs).

web.xml: This defines the default values for all web applications loaded into this instance of Tomcat, at the time of startup of the Tomcat instance. If a web application has its own deployment descriptor, its content will always override the configuration settings specified in this default descriptor.

logging.properties: As the name suggests, it defines the logging properties of the Tomcat instances (such as startup logs).

web.xml: This defines the default values for all web applications loaded into this instance of Tomcat, at the time of startup of the Tomcat instance. If a web application has its own deployment descriptor, its content will always override the configuration settings specified in this default descriptor.

context.xml: The contents of this file will load with every application. Configuration of parameters such as session persistence.


  1. JDBC Java Database Connectivity (JDBC) is a Java-based data access technology is an API through which the client accesses the server database. It is oriented towards a relational database and provides a way to query and update the database. \

  2. JNDI Java Naming and Directory Interface (JNDI) services are an API for the Java platform, which provides naming and directory functionalities to applications written using the Java programming language.

  3. DataSource It is a Java object used to access relational databases through the JDBC API. It works well when integrated with the JNDI and after a datasource object is registered with a JNDI naming service. Objects can be accessed by the application itself and connect to the database.

Application --> DataSource(Java object for getting a connection to a data source) --> JDBC(API for db connectivity) --> DataBase . DataSource must be registered with a JNDI naming service.
JDBC is Database realm, JNDI lets you store Objects in a virtual context (the Directory) that can be local, remote