3

When I downloaded Apache Tomcat it seem to be both an HTTP server and a Servlet container. Can I use Apache Tomcat with a different HTTP server than the one built-in in Tomcat ?

Abhinav
  • 530
  • 8
  • 21
John Doe
  • 418
  • 6
  • 18

2 Answers2

4

At tomcat webpage there is:

The Apache Tomcat® software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies

So yes, it is a servlet container as well. Generally, HTTP Server is just a server, that handles http requests (GET/POST/DELETE/PUT and some others rarely used). With pure http server, you couldn't run any servlet or jsp script.

I have no idea, how to replace the http server by a different one, but this documentation may be helpful for you - how it works together with appache http server.

https://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

fairtrax
  • 416
  • 2
  • 8
2

Generally,a program that accepts incoming HTTP connections is called a web server. In that case Apache Tomcat is a web server as it supports HTTP protocol and it is also a web container as it supports Java server pages (JSP)/Servlet, Application programming interfaces(APIs) as well.

Tomcat doesn’t include the typical features of a web server,where the Apache manages the static data of the web pages,redirection etc whereas tomcat manages the web application.

N.B.:- This link will enlighten you about the basic concepts of web server, web container and application server!

Abhinav
  • 530
  • 8
  • 21