How to configure, start, configure, and start tomcat

Source: Internet
Author: User

How to configure, start, configure, and start tomcat

After installing jdk, we found that clicking the tomcat startup. bat file will return in seconds.

This is because our tomcat is not configured properly.

Now let's talk about the proof.Configure tomcat.

1.

First download Jdk

Official Website: http://www.oracle.com/technetwork/java/javase/downloads/index.html


2.

Configure environment variables:

Right-click "computer", select "properties", click "Advanced System settings", select the "advanced" tab, and click "environment variables" in the lower part"


3.

Create a system variable:

Variable name: JAVA_HOME

Variable value: Your JDK installation directory


4.

Create a new system variable:

Variable name: CLASSPATH

Value:.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; % atat_home % \ BIN

Note: The preceding vertex number


5.

Modify the PATH variable

Variable name: PATH

Value:; % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;

Note: The semicolon, Add this value to the end of the path variable value ,.


6.

Create Tomcat environment variable

Variable name: TOMCAT_HOME

Variable value: directory where your TOMCAT is located


7.

Now you can start running the tomcat/bin/startup File.



8.

Finally, tomcat is successfully run.


Http://jingyan.baidu.com/album/03b2f78c46409b5ea237aefd.html


Enter the bin directory in the installation directory of your tomcat and run the following command in cmd (to enter the bin directory of tomcat), or double-click startup. bat starts tomcatshutdown. bat closes tomcatservice install (service. bat with the install parameter) to install the service.


How to configure and start Tomcat in zip version?

Install JDK first. You do not need to set environment variables in the current version as long as the version is installed, for a non-installed version, right-click my computer and choose Properties> advanced> environment variables> system variables to add the following environment variables (assuming that your j2sdk is installed in c: \ j2sdk1.5.0):

JAVA_HOME = c: \ j2sdk1.5.0
Classpath =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;
(.; Must not be less, because it represents the current path)
Path = % JAVA_HOME % \ bin

Decompress TOMCAT and add the following environment variables to the system variables (assuming that your tomcat is installed in c: \ tomcat ):

CATALINA_HOME = c: \ tomcat
CATALINA_BASE = c: \ tomcat

Modify the classpath in the environment variable, and append servlet. jar under the common \ lib directory under the tomat installation directory (you can append it according to the actual situation) to the classpath. The modified classpath is as follows:

Classpath =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; % CATALINA_HOME % \ common \ lib \ servlet. jar;

Start tomcat and access localhost: 8080 in IE. If you see the welcome page of tomcat, the installation is successful.

How to configure and start Tomcat in zip version?

Install JDK first. You do not need to set environment variables in the current version as long as the version is installed, for a non-installed version, right-click my computer and choose Properties> advanced> environment variables> system variables to add the following environment variables (assuming that your j2sdk is installed in c: \ j2sdk1.5.0):

JAVA_HOME = c: \ j2sdk1.5.0
Classpath =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;
(.; Must not be less, because it represents the current path)
Path = % JAVA_HOME % \ bin

Decompress TOMCAT and add the following environment variables to the system variables (assuming that your tomcat is installed in c: \ tomcat ):

CATALINA_HOME = c: \ tomcat
CATALINA_BASE = c: \ tomcat

Modify the classpath in the environment variable, and append servlet. jar under the common \ lib directory under the tomat installation directory (you can append it according to the actual situation) to the classpath. The modified classpath is as follows:

Classpath =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; % CATALINA_HOME % \ common \ lib \ servlet. jar;

Start tomcat and access localhost: 8080 in IE. If you see the welcome page of tomcat, the installation is successful.

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.