Tomcat and Tomcat environment variable installation configuration method tutorial _tomcat

Source: Internet
Author: User
Tags apache tomcat

We downloaded Tomcat, so what about the Tomcat environment variable configuration? The following small series and you share under the configuration of Tomcat environment variables.

Tomcat installation version

1.JDK: Version for Jdk-7-windows-i586.exe
Download Address http://www.oracle.com/technetwork/java/javase/downloads/index.html
2.tomcat: Version for Apache-tomcat-7.0.33-windows-x86.zip
Download Address http://tomcat.apache.org/
3.windows2003,32bit

Tomcat environment variable configuration steps

First, install JDK and Tomcat

1, install JDK: directly run Jdk-7-windows-i586.exe executable program, the default installation can be.

Note: The path can be other letter, do not suggest the path contains Chinese name and special symbol.

2, install Tomcat: Directly extract the download file "Apache-tomcat-7.0.33-windows-x86.zip" to C disk. The installation path is proposed to be modified to: C:\tomcat.

Note: The following is the executable file, double-click to run, the default installation can be.

Configuring JDK Environment variables (in step to see how to configure environment variables)

1, new variable name: java_home, Variable value: C:\Program files\java\jdk1.7.0

2, open path, add variable value:%java_home%\bin;%java_home%\jre\bin

3, new variable name: CLASSPATH, Variable value:. ;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar

Note:

1, to represent the current path,%java_home% is to refer to the java_home specified above;

2, Java_home specified JDK installation path, this path, including Lib,bin,jre folder, Tomcat,eclipse and other operations need to rely on this variable.

3. Path enables the system to identify Java commands under any path.

4, Classpath for Java Load class (class or Lib) path, only the class in Classpath, Java commands to recognize.

Third, test JDK

Under the cmd command, enter the Javac,java,javadoc command: A graphical interface appears indicating that the installation was successful.

Iv. Configuring Tomcat Environment variables

1, new variable name: catalina_base, variable value: C:\tomcat

2, new variable name: catalina_home, variable value: C:\tomcat

3, open path, add variable value:%catalina_home%\lib;%catalina_home%\bin

V. Start the TOMCAT service

Two kinds of methods:

1, method One: In the cmd command to enter the command: Startup, the following dialog box appears, indicating that the service started successfully.

2. Method Two: Right-click on the desktop "My Computer"-> "Management"-> "services and Applications"-> "services" to find "Apache Tomcat" service, right click on the service, select "Properties", the "Start type" from "Manual" to "automatic."

VI. Test TOMCAT

Open the browser, enter http://localhost:8080 carriage return in the address bar, and if you see a JSP page with Tomcat, your JDK and Tomcat have been built successfully.

Precautions:

1, the path in Java_home can not end with a semicolon, such as C:\Program files\java\jdk1.7.0.

2, the path in Catalina_base,catalina_home,tomcat_home cannot end with "\".

3, Java_home path must not be written in the path of the JRE.

4, in the environment variable to modify the add variable, be sure to pay attention to semicolons, spaces, whether there are extra letters. The author is simply because the path path is one more letter, how the configuration is not successful. If the configuration is unsuccessful, be sure to check it again and again.

Above error, very easy error: Catalina_home or java_home is not configured well. If the error prompts "The Catalina_home environment variable is not defined correctly". The Tomcat environment variable configuration is described here.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.