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

HTML table tag tutorial (20): row background color attribute BGCOLOR

The BGCOLOR attribute can be used to set the back...

MySQL inspection script (must read)

As shown below: #!/usr/bin/env python3.5 import p...

Proxy_pass method in multiple if in nginx location

1. First, let's review the relevant knowledge...

Implementation of JavaScript downloading linked images and uploading them

Since we are going to upload pictures, the first ...

A brief analysis of MySQL's lru linked list

1. Briefly describe the traditional LRU linked li...

How to define data examples in Vue

Preface In the development process, defining vari...

Working principle and implementation method of Vue instruction

Introduction to Vue The current era of big front-...

How to convert a string into a number in JavaScript

Table of contents 1.parseInt(string, radix) 2. Nu...

Best Practices for Deploying ELK7.3.0 Log Collection Service with Docker

Write at the beginning This article only covers E...

A brief introduction to Linux performance monitoring commands free

When the system encounters various IO bottlenecks...

URL representation in HTML web pages

In HTML, common URLs are represented in a variety ...

Implementation of TCPWrappers access control in Centos

1. TCP Wrappers Overview TCP Wrappers "wraps...