The Tomcat server is a free open source Web application server, which is a lightweight application server that is widely used in small and medium-sized systems and concurrent access users, and is the preferred server for developing and debugging JSP programs.
There are two ways to install the Tomcat server under Windows, one is to install directly, the other is the green version, which can be used directly after decompression.
This blog introduces you to the second way
First, download the Tomcat server from http://download.csdn.net/detail/u010105970/9493219
The first step is to put the Tomcat server's compressed package in the D:\develop directory (in fact can be placed in any directory just 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: A script file that holds Tomcat started and closed
conf: Various configuration files for the Tomcat server
Lib: support jar package for Tomcat server
logs: log file that holds Tomcat
Temp: holds temporary files generated by Tomcat runtime
WebApps:the directory where Web applications reside, that is, Web resources for outside access
Work : Working directory for Tomcat
When you're done, you can start the server.
Open the command line and go to the bin directory under the Tomcat folder
Enter the startup command to start the Tomcat server
When the Dos window pops up, it indicates that the Tomcat server started successfully.
then enter http://localhost:8080/in the browser when a prompt appears in the browser indicating that the Tomcat server successfully started
Deploy your project to the Tomcat server
As I described earlier, webapps is the directory where Web applications reside, that is, the directory of Web resources that are accessible to the outside world, so we deploy our own projects in the WebApps directory. After you open the WebApps folder, you can see the directory structure in the WebApps folder as follows
The Web pages that are accessed after the input http://localhost:8080/described above actually access the files in these folders that are in the WebApps folder.
Before you deploy your own web, start by creating a new app folder under the WebApps folder to save your Web project
Then put a picture in the app folder called Photo_04.jpg
Finally open the browser and enter http://localhost:8080/app/photo_04.jpg in the browser to access the photo_04.jpg placed in the app folder
Access this image on your phone without buying a domain name
The first step: need to connect the Tomcat server and mobile phone under the same LAN, my phone and computer are connected to the same router, so that the phone and the computer connected to the same LAN
Step Two: View the IP address of the server (because Tomcat is installed in the computer, so the IP address of the server is the IP address of the computer), open the command line, use the ipconfig command to view the host's IP address
IPV6 represents the IP address of the native, and also the IP address of the Tomcat server
So enter http://192.168.1.101:8080/app/photo_04.jpg in the browser to have access to photo_04.jpg this picture
You can also access this image on your phone after you send it to your phone.
Installing the Tomcat server under Windows