Related configurations for Tomcat

Source: Internet
Author: User

Configuring 3 Interfaces in Conf

<Servershutdown= "SHUTDOWN"Port= "17543"><Servicename= "Catalina">    <ConnectorPort= "17008"uriencoding= "UTF-8"Redirectport= "8443"ConnectionTimeout= "20000"Protocol= "http/1.1"/>    <ConnectorPort= "17833"Redirectport= "8443"Protocol= "ajp/1.3"/>

Server (line 1th) is the top-level component that represents a Tomcat instance. Can contain one or more Services, each of which has its own Engines and connectors.

Basic properties

    • ClassName: Use Java to implement the name of the class. This class must implement the Org.apache.catalina.Server interface. If you do not specify a class name, the standard implementation is used.
    • Address:server listens for a shutdown command on this TCP/IP address. If no address is specified, localhost will be used.
    • Port:server listens on this port for a shutdown command. A setting of 1 indicates that the shutdown command is disabled.
    • Shutdown: TCP/IP that is connected to the specified port will close Tomcat after receiving this command character.

A Service can connect one or more connectors to an engine. The default configuration defines a Service named "Catalina" that connects two connectors:http and AJP to the current engine.

Basic properties

    • ClassName: The Java class name used by the implementation. This class must implement the Org.apache.catalina.Service interface. If you do not specify a class name, the standard implementation is used.
    • The display name of the Name:service, if the standard Catalina component is used, will contain the log information. The name that each Service associates with a specific Server must be unique.

A Connector is associated to a TCP port that handles the interaction between the Service and the client. The default configuration defines two connectors.

http/1.1: Handles HTTP requests, making Tomcat an HTTP server. The client can send HTTP requests to the server via Connector and receive HTTP response information from the server side.

1 <Connectorport="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>

Unlike production services, which use 80 ports by default, the Tomcat HTTP service runs on TCP port 8080 by default. You can choose any number from 1024 to 65535 as the port number to run the TOMCAT server, provided that the port is not used by any other application. The ConnectionTimeout property defines the maximum number of milliseconds that the connector receives the request URI line (Request message) response after the link has been agreed upon. The default is 20 seconds. The Redirect property redirects the SSL request to port 8443 of TCP. Ajp/1.3:apache Jserv Protocol Connector handles the interaction between the Tomcat server and the Apache HTTP server.

1 <Connectorport="8009" protocol="AJP/1.3" redirectPort="8443"/>

Tomcat and Apache HTTP Services can be run together, and the Apache HTTP server handles static requests and the PHP;TOMCAT server is responsible for handling Java servlet/jsp. You can refer to "How Tomcat works with Apache to configure".

Follow catalina.sh in the bin

which

Java_opts can modify Tomcat's memory,
Jpda_address can be used in debug

Related configurations for Tomcat

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.