A detailed introduction to Tomcat directory structure

A detailed introduction to Tomcat directory structure

Open the decompressed directory of tomcat and you can see the following directory structure:

1.Tomcat's bin directory:

The bin directory is mainly used to store tomcat commands, which are divided into two categories, one ending with .sh (linux commands) and the other ending with .bat (windows commands).

Many environment variables are set here, such as JDK path and tomcat path.

startup is used to start tomcat

shutdown is used to shut down tomcat

Modify catalina to set tomcat's memory

2.Tomcat's conf directory:

The conf directory is mainly used to store some configuration files of tomcat.

server.xml can set the port number, domain name or IP, default loaded project, request encoding

web.xml can set the file types supported by tomcat

context.xml can be used to configure data sources and the like

tomcat-users.xml is used to configure and manage tomcat users and permissions

You can set the default loaded project in the Catalina directory

3.Tomcat's lib directory:

The lib directory is mainly used to store jar packages that need to be loaded when running tomcat.

For example, we can add the jdbc package for connecting to the database to the lib directory.

4.Tomcat's logs directory:

The logs directory is used to store log files generated by Tomcat during its operation, especially the logs output on the console. (Clearing will not affect the operation of Tomcat)

In the Windows environment, the console output log is in the catalina.xxxx-xx-xx.log file

In the Linux environment, the console output log is in the catalina.out file

5.temp:

The temp directory is used to store temporary files generated by Tomcat during its operation. (Clearing will not affect the operation of Tomcat)

6.Tomcat's webapps directory:

The webapps directory is used to store applications. When tomcat starts, it will load the applications in the webapps directory. Applications can be published in the form of folders, war packages, or jar packages.

Of course, you can also place the application anywhere on the disk and map it in the configuration file.

7.Tomcat's work directory:

The work directory is used to store compiled files during Tomcat runtime, such as JSP compiled files.

Clear the work directory and restart tomcat to clear the cache.

The above content is a detailed introduction to the Tomcat directory structure. For more articles about the Tomcat directory structure, please click the related articles below

You may also be interested in:
  • Tomcat architecture and plugin configuration tutorial diagram
  • Introduction to the tomcat directory structure_PowerNode Java Academy
  • Tomcat web application directory structure_PowerNode Java Academy
  • A brief introduction to Tomcat's overall structure

<<:  Detailed explanation of MySql 5.7.17 free installation configuration tutorial

>>:  JS+CSS to realize dynamic clock

Recommend

MySQL database Shell import_table data import

Table of contents MySQL Shell import_table data i...

Detailed explanation of Navicat's slow remote connection to MySQL

The final solution is in the last picture If you ...

A Brief Analysis on the Time Carrying Problem of MySQL

The default time type (datetime and timestamp) in...

Mysql keeps the existing content and adds content later

This command modifies the data table ff_vod and a...

Centos8 (minimum installation) tutorial on how to install Python3.8+pip

After minimizing the installation of Python8, I i...

How to enable or disable SSH for a specific user or user group in Linux

Due to your company standards, you may only allow...

vue dynamic component

Table of contents 1. Component 2. keep-alive 2.1 ...

Native JavaScript to achieve skinning

The specific code for implementing skinning with ...

How to test the maximum number of TCP connections in Linux

Preface There is a misunderstanding about the max...

Solution to the problem that Navicat cannot remotely connect to MySql server

The solution to the problem that Navicat cannot r...

Basic principles of MySQL scalable design

Table of contents Preface 1. What is scalability?...

Docker builds CMS on-demand system with player function

Table of contents text 1. Prepare the machine 2. ...

Detailed explanation of MySQL sql_mode query and setting

1. Execute SQL to view select @@session.sql_mode;...

MySQL 8.0.17 installation and usage tutorial diagram

Written in front In the past and in the current p...