If I am given a war file that contains a Java web application, and I want to run that war locally, then do I just need Tomcat, or do I need Tomcat and Apache httpd (or any other web server)? Thanks in advance!
that since Apache Tomcat is built on Apache HTTP server the configuration of the plugin should be the same.
Key difference between Tomcat and the Apache HTTP Server the Apache HTTP Server, but the fundamental difference is that Tomcat provides dynamic content by employing Java-based logic, while the Apache web server's primary purpose is to simply serve up static content such as HTML, images, audio and text.
Using Tomcat without Apache Tomcat includes its own web server, so Apache is not technically needed. It is possible to run Tomcat without Apache. This approach is best suited when the Virtual Server is only going to be used to run this application, and nothing else.
Tomcat can also be run as an add-on to the Apache HTTP Server (or Microsoft IIS) - as the Java servlet/JSP container. In this combination, Tomcat executes the Java servlets and JSPs, the Apache serves the static HTML pages and performs other server-side functions such as CGI, PHP, SSI, etc.
Tomcat is a web server of its own, so a separate web server like Apache is not required. You probably will want to change Tomcat's port though, since it defaults to 8080 and web sites are usually on port 80.
I think people generally put Apache in front of Tomcat so they can do things like:
I'd recommend the YAGNI approach and just go with Tomcat until/unless you find a reason you want Apache in front of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With