Home> Java> javaTutorial> body text

Why use tomcat?

藏色散人
Release: 2020-09-15 09:58:58
Original
8435 people have browsed it

Why use tomcat?

First of all, tomcat is open source, developed based on the java language, and is a container for deploying web projects. Ordinary HTML can be processed directly by the browser without the need for deployment such as tomcat. However, such as servlets, the browser cannot directly parse the content inside. These require a tool to process the data so that the browser can correctly identify this information when accessing the host.

can help us connect http requests (do some general processing), and then forward the requests to our servlet processor for processing. We only need to put our business processing in the service method of the servlet, no There are other redundant things to focus on.

Specific processing method:

1. First use http to access your web application. Your server needs to open a port to listen for requests, right?

2. Since the http protocol is used, do you need to parse the http request from the network?

3. After parsing, do you need to access the corresponding application system?

4. Do you need to return the result set returned by the system after processing the request to the user so that the user can display it in the browser?

Middleware just helps you complete these things: open the listening port to listen to the user's request, parse the http request sent by the user and then access the application system you specify, and then return the page you return to through tomcat. user.

The above is the detailed content of Why use tomcat?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!