On the knowledge of Tomcat, summed up, the summary may be a little white, but I think the foundation is still very important! (think of which)
When developing Web projects in Java, you need to use a Tomcat server.
So what is Tomcat?
A: Tomcat is a servlet container, and it also has the function of a traditional Web server: Working with HTML pages, but not in the ability to handle static HTML, as in Apache.
So what is a servlet? What Apache? What's the relationship between Apache and Tomcat?
A: A servlet is a small program running on a server, a servlet is a Java class, and it can be accessed through the request-response programming model, a servlet program that resides in the server's memory.
For servlet development steps, life cycle, etc., see the relevant knowledge of the servlet.
A: Apache HTTP server (Apache), Apache Software Foundation is an open source Web server, can be run in most computer operating systems, due to its multi-platform and security is widely used, is the world's largest use of Web server software.
A: This I briefly say, Apache is a Web server. Tomcat is an application (Java) server, developed by the Apache Software Foundation, and can run independently with Apache.
This blog is very detailed: http://blog.csdn.net/longzs/article/details/10959945
Tomcat installation Configuration
Download Tomcat, official website http://tomcat.apache.org/
Install to find a disk installation (it is best to find a plate, quick, my personal habits)
Mostly configuration (mostly in Eclipse and MyEclipse, basically the same, with Eclipse as an example)
Open Eclipse→window→preferences→server→runtime Environments→add→apache Tomcat 8.0 (choose your Tomcat version) →next→browses ( Cuff your Tomcat path to the inside) →finish→ok
Installation configuration of the JDK I will not say (Rotten Street).
Attention!!!
Now that your Tomcat is ready, if you have the JDK, create a Hello World project, and the Tomcat in Eclipse is good (output). However, when accessing the http://localhost:8080/
found that the Tomcat homepage is not open! What to do?
Solution: This blog can solve http://blog.csdn.net/guitk/article/details/8306987, but there is a problem he did not very good solution, that is, the server locations in accordance with his method if the point is not open. You can do this: right-click Tomcat→clean, you can open it. Then you can open the Http://localhost:8080/home page smoothly.
Why does Tomcat want to modify the port number? How to modify? may be associated with other application servers installed on the computer. Or there is a conflict in the port number of the database server. Modify Tomcat/conf/server.xml file <connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirtPort= "8443 "> Modify" 8080 ". such as 8888, 80, 8090, etc. (random value). After saving. If there is a port conflict (because the old port still exists, refer to the method on the Internet, switch off the port), the simplest way to close all ports is to restart the computer and then access the http://localhost:8888. Of course there are a lot of questions not mentioned. Add it later.
Questions about Tomcat