简体   繁体   English

Apache Tomcat 究竟是做什么的?

[英]What exactly Apache Tomcat do?

I am not really into this servlet programming kind of programming, I actually want to be a game developer but as part of my course I had to study servlets and apache tomcat is related to them.我并不是真的喜欢这种 servlet 编程类型的编程,我实际上想成为一名游戏开发人员,但作为我课程的一部分,我必须学习 servlet,而 apache tomcat 与它们有关。 I wanted to know what exactly tomcat is for?我想知道 tomcat 到底是干什么用的? What I know about apache is: - It is used to make our computer a server.我对 apache 的了解是: - 它用于使我们的计算机成为服务器。 - We deploy our servlets on the server which we made through apache. - 我们在我们通过 apache 制作的服务器上部署我们的 servlet。 This might be wrong because I have not studied the tomcat that much.这可能是错误的,因为我对 tomcat 的研究没有那么多。 So I was thinking that if tomcat makes our computer an server can anyone else who is on his/her own computer can access thing on our server?所以我在想,如果 tomcat 使我们的计算机成为服务器,那么在他/她自己计算机上的任何其他人都可以访问我们服务器上的内容吗? if not then why do we use tomcat and why do we even deploy the servlets on them(or should I say why do we even develop servlets) this is my question and this might be dumb thanks for you response.如果不是,那么我们为什么要使用 tomcat,为什么我们还要在它们上部署 servlet(或者我应该说我们为什么要开发 servlet)这是我的问题,这可能是愚蠢的,感谢您的回复。 Sorry for bad english.抱歉英语不好。

Tomcat is a java web server, which handles client connection negotiation, security, routing, caching, and all the basic functions of a web server. Tomcat 是一个 java web 服务器,它处理客户端连接协商、安全、路由、缓存以及 web 服务器的所有基本功能。 Servlets are mini applications designed to run on the web, which are run on the server, which when routed does whatever its purpose is and returns the output to the server, which then is sent to the client. Servlet 是设计用于在 Web 上运行的微型应用程序,它们在服务器上运行,在路由时会执行其目的并将输出返回到服务器,然后将其发送到客户端。 If an error occurs the server should handle it gracefully and show an error page as opposed to failing outright.如果发生错误,服务器应妥善处理并显示错误页面,而不是彻底失败。

Here is some more info on servers: https://en.wikipedia.org/?title=Server_(computing)以下是有关服务器的更多信息: https : //en.wikipedia.org/?title=Server_(computing)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM