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

Detailed explanation of Docker Compose deployment and basic usage

1. Docker Compose Overview Compose is a tool for ...

CSS Summary Notes: Examples of Transformations, Transitions, and Animations

1. Transition Transition property usage: transiti...

TypeScript union types, intersection types and type guards

Table of contents 1. Union Type 2. Crossover Type...

Example code of setting label style using CSS selector

CSS Selectors Setting style on the html tag can s...

JDBC-idea import mysql to connect java jar package (mac)

Preface 1. This article uses MySQL 8.0 version Co...

Vue dynamic menu, dynamic route loading and refresh pitfalls

Table of contents need: Ideas: lesson: Share the ...

Detailed explanation of MySQL master-slave replication process

1. What is master-slave replication? The DDL and ...

Detailed explanation of log processing of Docker containers

Docker has many log plug-ins. The default is to u...

Detailed installation and use of docker-compose

Docker Compose is a Docker tool for defining and ...

MySQL Order By Multi-Field Sorting Rules Code Example

Say it in advance On a whim, I want to know what ...

MySQL 5.7.23 decompression version installation tutorial with pictures and text

It is too troublesome to find the installation tu...

Detailed explanation of the solution to font blur when using transform in CSS3

This question is very strange, so I will go strai...

MySQL latest version 8.0.17 decompression version installation tutorial

Personally, I think the decompressed version is e...

A brief discussion on VUE uni-app conditional coding and page layout

Table of contents Conditional compilation Page La...

Use viewport in meta tag to define screen css

<meta name="viewport" content="w...