How to install a Tomcat server under Windows build _tomcat

Source: Internet
Author: User
Tags pack tomcat tomcat server

Related reading:

How to deploy a tomcat server on MyEclipse

Tomcat server is a free open source Web application Server, is a lightweight application server, in the small and medium-sized systems and concurrent access users are not many occasions are widely used, is the development and debugging of JSP program's preferred server.

There are two ways to install a Tomcat server under Windows, one for direct installation and one for the green version, which can be used directly after decompression.

This article introduces the second way

First download the Tomcat server from the http://download.csdn.net/detail/u010105970/9493219

The first step is to put the Tomcat server's compression pack under the D:\develop directory (in fact, it can be placed in any directory only I usually put my development tools in this directory, easy to manage)

After unpacking and opening, you can see the directory structure of Tomcat as follows

File Explanation:

Bin: Storing script files for starting and shutting Tomcat

Conf: A variety of configuration files for hosting tomcat servers

LIB: Support Jar pack for Tomcat server storage

Logs: Log files for Tomcat

Temp: Store temporary files generated by Tomcat runtime

Directory of Webapps:web applications, that is, the directory of Web resources for outside access

Working directory for Work:tomcat

You can start the server after you finish the above operation.

Open the command line and enter the bin directory under the Tomcat folder

Enter the startup command to start the Tomcat server

When the DOS window is ejected from the image below, the Tomcat server is successfully launched

Then enter http://localhost:8080/in the browser the prompt box shown in the following illustration indicates that the Tomcat server has successfully started

Deploy your own project to a Tomcat server

In the previous I have described the WebApps is the Web application directory, that is, the Web resources for outside access directory, so the WebApps directory to deploy our own projects, open the WebApps folder can be seen in the WebApps folder directory structure as follows

The pages that are accessed after entering http://localhost:8080/are actually accessed by the files in these folders that are in the WebApps folder.

Before you deploy your own web, first create a new app folder under the WebApps folder to save your Web project

Then put a picture called Photo_04.jpg in the app folder

Finally, open the browser and enter http://localhost:8080/app/photo_04.jpg in the browser to access the Photo_04.jpg placed under the app folder

Access this image on your phone without buying a domain name

The first step: the Tomcat server and mobile phone need to be connected to the same LAN, my phone and computer are connected under the same router, so that the phone and computer connected to the same LAN

Step two: View the IP address of the server (because Tomcat is installed on the computer, so the IP address of the server is the IP address of the computer), open the command line, and use the ipconfig command to view the IP address of the host

The IPV6 in the figure above represents the IP address of this computer and the IP address of the Tomcat server

So enter http://192.168.1.101:8080/app/photo_04.jpg in the browser to access the Photo_04.jpg picture

You can also access this image on your phone after you send this address to your phone.

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.