Windows environment, click Tomcat's Startup.bat flash problem

Source: Internet
Author: User
Tags server port
PrefaceRecently, in the local test project, the small part of the local decompression of three Tomcat, the need to run three Tomcat, but when clicked on the Bin directory Startup.bat, the black box appears flash problem, the following is the problem solution. Change port numberBecause you want to run three Tomcat at the same time, each tomcat is running on a different port, so to change the default profile-server.xml, the configuration file is under the Conf directory, and there are a few points to change. 1, <server port= "8006" shutdown= "Shutdown" >
Change server port number, default is 8005, small series T changed to 8006 2, <connector port= "8081" protocol= "http/1.1"
Change the default HTTP port, default is 8080, small is changed to 8081 3, <connector port= "8009" protocol= "ajp/1.3" redirectport= "8443"
/>
Change the AJP protocol port, increment on the line, in fact, this protocol is not often used, only in the use of Apache server may be used, and now use Nginx, so this protocol is not often used, small set recommend this configuration comment off on the line. Adding environment VariablesTomcat is written in the Java language, and of course the configuration of the JDK environment variables is no longer posted, so add some environment variables about tomcat below. -

1. Add environment variable The environment variable name is: catalina_home2
The environment variable value is: Tomcat installation path (H:\Tomcats\apache-tomcat-7.0.69 this is the installation path of the small set).

2, modify the PATH environment variable, increase:%catalina_home2%\bin\; Modify Startup.bat If multiple tomcat is deployed locally and each port number has been modified, right-click Startup.bat, open with Notepad, and replace the%catalina_home%
all in the file with the% catalina_home2% Modify Catalina.bat to change the%catalina_home% in a file to%catalina_home2% summary: In fact, the configuration of Tomcat Factory is moderate, if you want to optimize Tomcat, then we have to change a lot of configuration, for example, often with the change Tomcat mode of operation, the bio into NIO mode. Because the default mode, performance is very low, without any optimization processing and support, how to change that, is to modify the connector node in the Server.xml, Modify protocol to Org.apache.coyote.http11.Http11NioProtocol

Related Article

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.