Deploy a Java Web project using tomcat in Windows

Source: Internet
Author: User

From: http://jingyan.baidu.com/article/4e5b3e1976cabe91901e242e.html

Self-Summary after actual operation:
To successfully deploy a Java Web project using Tomcat on Windows, it is not very easy. I found a lot of information on the Internet and tried it many times. I feel that it is either not comprehensive or not comprehensive. The following is a summary of my experiences in successfully deploying a Java Web project: steps/methods
  1.  The first thing we need to do is to configure the Java development environment variables. See the following for how to configure:
    1.1
    Download JDK
    Go to JDK official website to download the latest JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html
    1.2Install JDK and configure the variables java_home, path, and classpath.
    Java_home = c: \ Program Files \ Java \ jdk1.6.0 _ 03 (JDK installation directory)
    Path = % java_home % \ bin; % java_home % \ JRE \ bin; (command search path)
    Classpath =.; % java_home % \ Lib \ tools. jar;
    % Java_home % \ Lib \ DT. jar; (Class search path)
  2.  After the environment variables are configured, you need to install Tomcat:
    2.1Go to Tomcat Official Website: http://tomcat.apache.org/download suitable for Windows tomcat to the local machine.
    2.2Decompress the package to a directory. (Equivalent to installation)
  3.  After everything is configured, you need to put the Java Web project in Tomcat:
    3.1 after a web project is developed using development tools (we only discuss the use of myeclipse development tools), we use myeclipse to package it into a project file (*. war or *. ear ). Right-click the project file and choose "Export" from the shortcut menu. The result is as follows:
    Select the one under "J2EE" and click Next. The result is as follows:


    Select the Save directory, enter the file name, and click Finish.
    3.2 find the generated project file in the selected directory and put the project file under webapps under the tomcat installation directory, just like this: D: \ tomcat6.0 \ apache-Tomcat-6.0.32 \ webapps.
    3.3 then start Tomcat. Under the tomcat installation directory, find the Startup File under the bin directory and click it to start Tomcat.
    3.4 next, enter the URL in the browser to access what we want to access.

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.