Tomcat installation and configuration, tomcat installation Configuration

Source: Internet
Author: User
Tags apache tomcat

Tomcat installation and configuration, tomcat installation Configuration

I am a java-developed cainiao engineer who has learned how to install and use tomcat over the past few days and finally succeeded in running it today.

1. tomcat installation

1. tomcat download URL: http://tomcat.apache.org/

2. Open the URL, find the Tomcat version you want on the left Download, and click

3. Select Tomcat 7.0, and find 7.0.82 >>>> Core >>>> 64-bit Windows zip on the right. (tomcat downloads are all under the core. You can see which one is needed, I use 64-bit win7. Of course I chose this)

4. Click it to download it immediately. After downloading it, decompress the zip file to the folder you want to put it in, even if the installation is successful.

 

2. Run tomcat in eclipse

1. Open eclipse

2. Window >>>> Preferences >>>> Server >>>> Runtime Environments

3. Click "Add..." and select the server to be added in the middle. My name is tomcat7. Select Apache >>> Apache Tomcat v7.0.

4. Click Next to go to the Next step. The Name is the Name of your server (which can be written at will, but generally it is the server Name Apache Tomcat v7.0 ), tomcat installation diretory is the location of the server you added. Click Browse ..., find the installation path of Tomcat 7 (my path is D: \ program files \ Apache Tomcat 7.0.82)

5. Click Finish.

6. File >>>> New >>> Dynamic Web Project, select the server (Apache Tomcat v7.0) in the Target runtime Option)

7. Click "Next", and then click "Generate web. xml deployment descriptor ".

8. Click Finish.

9. Create an index. jsp file under WebContent and write the content at will.

10. Right-click the project and Choose >>> Run as >>> Run on Server >>>> Choose an existing server >>>> select the Tomcat Server (Tomcat v7.0 Server) under localhost at localhost) >>>> click Finish.

11. tomcat will run at this time.

12. If no step 4 or 5 is involved in project creation, you can also right-click an existing project and choose >>> properties >>>> Java Build Path >>> Libraries >>> Add Library...

13. Select Server Runtime >>>> Next >>>> select Tomcat Server >>>> Finish >>> Apply >>> OK

14. Repeat Step 1

 

Iii. tomcat server environment variable configuration

1. Desktop> my computer, right-click> Properties> advanced system Settings> Environment Variables

2. System variables >>> new >>> variable name: CATALINA_HOME >>> variable value: Find the installation path of Tomcat 7 (my name is d: \ program files \ Apache Tomcat 7.0.82) >>> OK

3. System variables >>> new >>> variable name: CATALINA_BASE >>> variable value: Find the installation path of Tomcat7 (my name is d: \ program files \ Apache Tomcat 7.0.82) >>> OK

4. System variables (User variables) >>>> select Path >>>> edit (create without Path) >>> variable value: % CATALINA_HOME % \ lib; % CATALINA_HOME % \ bin

5. Open win + R and run >>> startup

6. tomcat runs successfully.

7. tomcat runs only when JDK is installed successfully.

8. Check whether JDK is successfully installed >>>> win + R open and run >>>> cmd >>> java

9. There are three possible reasons for the crash in step 1. One is that the Registry has residual Tomcat files, the other is that the variables are not paired, and the third is that Tomcat installed with multiple versions causes a conflict.

10. follow my steps. If your tomcat still cannot run successfully, check the above steps repeatedly... What can I do? I'm also desperate ~ (Go to Baidu again)

 

4. I also learned a little from others on Baidu. The main reference URLs are ):

1. http://jingyan.baidu.com/article/86f4a73e5be03237d65269ef.html

2. http://jingyan.baidu.com/article/8065f87fcc0f182330249841.html

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.