A brief introduction to Tomcat and Servlet and the installation of Tomcat

 Software structure development history

  • Stand-alone era (desktop application)

Desktop applications are commonly known as stand-alone applications. All data of the software is stored locally on the computer. The advantage is that it is easy to use and simple in structure. The disadvantage is that it is difficult to share data, poor security and not timely update. Common stand-alone desktop applications include Office, AutoCAD, Adobe series software

  • Online mode (Client-Server mode)

The C/S structure refers to the client and server architecture. The advantage is that data sharing is convenient and the security is high. The disadvantage is that the client must be installed and it is difficult to upgrade and maintain, such as the common QQ client and WeChat client.

  • Internet era (Browser-Server mode)

The B/S mode is the browser server mode. The advantage is that the development is simple, no client is required (as long as there is a browser), the data has been shared, and the disadvantage is that compared to the C/S mode, the execution speed and user experience are relatively higher weak

B/S mode execution process

The user enters the URL in the browser--->DNS resolves the domain name to the ip address--->Transfers the request to the web server corresponding to the ip address under the http protocol--->The server program processes and returns a response

Request and response

Request: a packet sent by the browser to the server

Response: The data packet returned by the server to the browser

J2EE

J2EE (java 2 platform enterprise edition) has also become the java2 enterprise edition, which consists of 13 functional modules, as follows:

Developing BS (Web) applications is the core function of J2EE

Apache Tomcat和Servlet

Tomcat is a free and open source web application server program under the Apache Software Foundation. It is the implementer of the java Web (Servlet and JSP) standard, and the servlet (Server Applet) server applet. The main function is to generate dynamic web content. An important part of J2EE.

Tomcat installation

  • Install JDK 8

See tutorial

  • Install Tomcat 8.x

Click on the website and select the corresponding Tomcat version according to the corresponding jdk version. For example, select Tomcat8.5 here, and then select  64-bit Windows zip  ( pgpsha512 ) to download and install

After downloading, decompress (no installation required), run the startup.bat file in cmd, or click this file directly

The last sentence appears in the pop-up dialog box, indicating that the installation has started successfully

At this point, enter localhost:8080 in the browser to see this page

Guess you like

Origin blog.csdn.net/qq_41459262/article/details/110879785