A detailed description of Tomcat files

Source: Internet
Author: User
Tags apache tomcat

As a Web project, the most common server is Apache Tomcat. Although Tomcat has been used all the time, it is limited to the use of the stage, has not been in-depth study. Want to learn more about Tomcat, the most recommended is the official website: http://tomcat.apache.org/(although all English, it seems more obscure, but still recommend that everyone in the official website to study, on the one hand, the authority, on the other hand exercise their English ability. Bo Master himself English is not good, but still insisted crossing net. )

To get started with the internal structure of Tomcat, the Tomcat version of the blogger is: apache-tomcat-8.0.3-windows-x86, open after decompression, inside is:

Take a look at a file other than a folder.

License as the name implies is a license, which records some of Tomcat's terms and so on.

Notice a new notice of Tomcat, the announcement.

Release-notes This is a description of the release version, some bundled APIs, new features, and so on.

RUNNING.txt Records Tomcat's operating environment and how to configure parameters, variables, startup, and so on.

================ Gorgeous split-line ====================

The contents of the folder are described below.

Bin folder

The executable file is placed under the Bin folder, where: The Bat/exe file is a script file that can be executed under Windows. SH file when the executable script file is Linux/unix. There are some jar files, which will be said later.

Below are all the files in the Bin folder:

Start with the introduction.

Bootstrap.jar from the file name you can see that this jar package is the bootloader jar and is the portal for Tomcat.

Catalina.bat This script is more important. This script has done a lot of basic operations, such as starting

Close, etc., Catalina.bat are involved.

The catalina.sh file works with Catalina.bat, except in the Linux/unix system.

Catalina-tasks.xml configuration file, mainly introduces a variety of jar packages.

Commons-daemon-native.tar.gz Linux/unix under.

Configtest.bat the script file that detects whether the syntax is correct.

Cpappend.bat This script can be understood, CLASSPATH (CP) append is to add the specified parameters to the classpath inside.

Digest.bat Bo Master for the time being not clear.

Service.bat start the Tomcat service. It's related to registering the Tomcat service.

Setclasspath.bat set Classpath script, called in Catalin.bat script, can set java_home,jre_home and so on.

Shutdown.bat primarily checks Catalina.bat execution of the required environment and calls the Catalina.bat batch file to close the Tomcat service.

Startup.bat primarily checks Catalina.bat execution of the required environment and invokes the Catalina.bat batch file to start the Tomcat service.

Tcnative-1.dll Accelerator components to improve performance. (also found on the Internet)

Tomcat8.exe

Tomcat8w.exe

Tomcat-juli.jar Apache Tomcat is implemented by one of its own java.util.logging multiple key elements. This implementation is called "Juli". The core component of the implementation is a custom logmanager that can get different web apps (and different class loader) running in Tomcat. He supports configuring a separate log configuration for the app. When a web app is uninstalled from within, it gets a notification from Tomcat so that the classes he refers to can be purged and avoid memory leaks.

Tomcat-native.tar.gz inside is the Tomcat local library.

Tool-wrapper.bat Tool Wrapper Script

Version.bat is generally used to determine the system version to obtain the system version information.

Conf (configurator) folder

Conf (configurator) folder below is the configuration file

Catalina.policy Tomcat policy File

Catalina.properties Catalina configuration file

Context.xml Tomcat Common environment configuration, can also be configured in Server.xml <context/>

Logging.properties Log configuration file

Server.xml is a very important configuration, port, thread pool, etc. need to be configured here.

Element name

Property

Explain

Server

Port

Specify a port that listens for requests to shut down Tomcat

Shutdown

Specify the command string to send to the port

Globalnamingresources

Global Jndi resources for servers, can have sub-tags <Resource></Resource>

Executor (thread pool, one or more connector can share this thread pool)

Name

Thread pool name, name must be unique

Nameprefix

The name prefix of the thread, which is used to mark the name of the thread, so that each thread uses the prefix with the thread number, such as Catalina-exec-1, catalina-exec-2

MaxThreads

The maximum allowable number of threads constructor, the default is 200, large concurrency should be set higher, anyway just limit, do not occupy resources

Minsparethreads

The smallest number of active threads, the default is 25. This should be adjusted according to the load situation. Too small to affect the speed of the reaction, too large to occupy resources in vain

MaxIdleTime

The smallest number of active threads, the default is 25. This should be adjusted according to the load situation. Too small to affect the speed of the reaction, too large to occupy resources in vain

ThreadPriority

The level of the thread. Default is Thread.norm_priority

Service

Name

Specify the name of the service

Connector (indicates a connection between the client and the service)

Port

Specify the port number to be created on the server side and listen for requests from the client at this fracture

Minprocessors

The number of threads that were created when the server started processing requests

Maxprocessors

Maximum number of threads that can be created to process requests

Enablelookups

If true, a DNS query can be made by calling Request.getremotehost () to obtain the actual hostname of the remote client and, if False, to return its IP address instead of a DNS query

Redirectport

Specifies the port number that the server is redirecting when it receives an SSL transfer request when it is processing an HTTP request

Acceptcount

Specifies the number of requests that can be placed in the processing queue when all the threads that can be used to process the request are used, and requests that exceed this number will not be processed

ConnectionTimeout

Specify the number of times to time out (in milliseconds)

Engine (representing the request processor in the specified service, receiving and processing requests from connector)

Name

Defaulthost

Specifies the default host name for the processing request, which is at least the same as the Name property value of one of the host elements

Jvmroute

Host (represents a virtual host, and can contain a context child node configuration virtual directory)

Name

Specify host Name

AppBase

Application base directory, which is the directory where the application is stored

Unpackwars

If true, Tomcat will automatically unzip the war file, otherwise it will run the application directly from the war file.

Autodeploy

Automatic deployment

Xmlvalidation

Whether to validate XML

Xmlnamespaceaware

Realm (the database that holds the user name, password, and role)

ClassName

Specifies the class name used by realm, and this class must implement the Org.apache.catalina.Realm interface

Context (Host child node configuration virtual directory)

Path

Virtual directory Name

DocBase

Physical path

Debug

Debug mode

Reload

True reload, automatically loaded after modification

Above is the meaning of the server.xml element. The basic configuration is here.

Tomcat-users.xml Tomcat configures the user's files. is to specify the console user, role, password.

<tomcat-users>
<role rolename= "Manager"/>
<role rolename= "admin"/>
<user username= "admin" password= "123456" roles= "Admin,manager"/>
</tomcat-users>

With the above configuration, you can add users with administrator privileges for Tomcat.

Web. XML accesses the Tomcat portal. Configure load classes and resources, such as welcome pages.

Lib folder

The Lib folder below is the jar package provided by Tomcat, the repository file. Tomcat needs to run.

Log folder

Log folder holds tomcat log files

Temp Folder

Temp folder holds temporary files

WebApps folder

The WebApps folder is a directory of Tomcat publishing Web projects, with files such as documents, examples, host configurations, and so on by default.

Work folder

Store the JSP compiled class file.

The structure of the general Tomcat is this way, most of it is by looking at the data, the various file information integrated into one piece.

Transferred from: http://my.oschina.net/leamon/blog/209809

(go) Tomcat file in detail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.