Javaee--tomcat Download and launch

Source: Internet
Author: User
Tags tomcat server

Statement: The material used in this column is written by the VIP students of the Kay Academy, who has the right to be anonymous and has the final right to interpret the article; The Edith Academy is designed to promote students to learn from each other on the basis of public notes.

Tomcat Download and launch

Tomcat is a core project of the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals. With Sun's involvement and support, the latest servlet and JSP specifications are always reflected in Tomcat, and Tomcat 5 supports the latest servlet 2.4 and JSP 2.0 specifications.
Because the Tomcat technology advanced, stable performance, and free, so deeply loved by Java enthusiasts and has been recognized by some software developers, become the most popular Web application server, mainly used in Java.
Tomcat server is a free open source Web application server, the latest version of Tomcat is 9.0, is a lightweight application server, in small and medium-sized systems and concurrent access users are not widely used, is the first choice to develop and debug JSP programs. For a beginner, it can be thought that when the Apache server is configured on a single machine, it can respond to requests for access to the HTML (one application under the standard Universal Markup Language) page. In fact, Tomcat is an extension of the Apache server, but it runs independently at runtime, so when you run Tomcat, it actually runs separately as a separate process from Apache.
Tomcat is developed using Java, so as long as the JDK can be run on any system platform, we can download it to the Tomcat server on the official website:

http://tomcat.apache.org/

I downloaded the 9.0 version:

After downloading the extracted to your own designated path, and then you can see the extracted directory, there are several folders:

The function of these directories can be referred to the following mind map:

Then it is the configuration environment variable:
We need to configure three environment variables, 1.java_home 2.PATH 3.catalina_home, which can be ignored if the Java_home is already configured:
1. Configure Java_home, the variable value is the JDK's installation directory:

2. Configure Path,path to configure the bin directory of the JDK:

3. Configure Catalina_home, which is the home directory where Tomcat is configured:

Mind Mapping:

After the environment variable is configured, you can start Tomcat, and you can start by locating the startup double-click in the Bin directory:

Startup success:

About the issue with Tomcat startup:
1. If you have a flashback when you start Tomcat, usually the environment variable is not configured, then carefully examine the environment variables, especially the CATALINA_HOME environment variables.
2. Then there is already a Tomcat boot, so the port is in the case of a flash back.
3. We can drag the startup to Cmd to execute, will feedback the error log, example:

The above message is that the CATALINA_HOME environment variable is not configured.

If you check the environment variables are not a problem, or still flash back, you can create a Run.bat file (name can be customized), and then define the following: Set Java_home=c:\program files\java\jdk1.8.0_112
Set path=%java_home%\bin;%path%
Set Catalina_home=.
Startup.bat

Then click on the new BAT file to launch, this method will be able to solve the problem of environment variables.
After successful startup, access to http://localhost:8080/through the browser, because Tomcat's default port is 8080, the following page appears to be successful and access to Tomcat's default page:

Mind Mapping:

Javaee--tomcat Download and launch

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.