Tomcat configuration (transfer from others)

Source: Internet
Author: User

How Tomcat Configures environment variables
    • |
    • Browse:64191
    • |
    • Updated: 2012-12-05 17:42
    • 1
    • 2
    • 3
Step through Reading

Download install tomcat, how do I configure environment variables? Does the configuration process have errors as often as the author?
Please read the text carefully and the precautions.

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

Method/Step
  1. 1

    I. Installing JDK and TOMCAT

    1. Install JDK: Run the Jdk-7-windows-i586.exe executable directly and install it by default.

    Note: The path can be other drive letter, not recommended path contains Chinese name and special symbols.

    2. Install Tomcat: Directly unzip the download file "Apache-tomcat-7.0.33-windows-x86.zip" to the C drive. The installation path is recommended to be modified to: C:\tomcat.

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

  2. 2

    Ii. Configuring the JDK environment variables (see How to configure environment variables in steps)

    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,. Represents the current path,%java_home% is referring to the previously specified java_home;

    2,java_home indicates the JDK installation path, which includes folders such as Lib,bin,jre, Tomcat,eclipse, and so on, which need to be dependent on this variable.

    3,path allows the system to identify Java commands under any path.

    4,classpath is the Java load class or lib path, only the class is in Classpath and the Java command is recognized.

  3. 3

    Third, test the JDK

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

  4. 4

    Iv. Configuring the Tomcat environment variable

    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

  5. 5

    V. Start the TOMCAT service

    Methods two kinds:

    1, method One: Enter the command under the cmd 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", find the "Apache Tomcat" service, right click on the service, select "Properties", the "Startup Type" from "Manual" to "automatic".

  6. 6

    VI. Test TOMCAT

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

    END
Precautions
    • The path in 1,java_home cannot end with a semicolon, such as C:\Program files\java\jdk1.7.0.

      The path in 2,catalina_base,catalina_home,tomcat_home cannot end with "\".

      The path of the 3,java_home must not be written as the path to the JRE.

      4, in the environment variables to modify the addition of variables, be sure to pay attention to semicolons, spaces, whether there are extra letters. The author is not successfully configured because there is one more letter in the path. If the configuration is unsuccessful, be sure to check again and again.

      Above error, very prone to error: Catalina_home or java_home is not configured well. If the error "The CATALINA_HOME environment variable is not defined correctly"

Tomcat configuration (transfer from others)

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.