Here are some points in favor of the Apache Web Server over Tomcat:
It is faster than Tomcat when serving static pages Apache has more configuration options than Tomcat Supports CGI scripts, Server API modules, Perl, PHP, etc…The big downside for Apache is the lack of functionality for Java Servlets or JavaServer Pages, which cannot be run with Apache’s web server. Tomcat was created to address this problem.
Apache Tomcat
Apache Tomcat, otherwise known as “Tomcat” is an open-source web server that started as a servlet reference in 1999 and is developed and maintained by the Apache Software Foundation. It is a Java implementation that runs Java Servlets and JavaServer Pages, known as JSPs, as specified from Oracle. Often used together, Tomcat can be a valuable addition to your Apache Web Server installation; however, Tomcat can also stand on its own as a web server without Apache.
There are different installation methods and way that Tomcat can run to either supplement your Apache Web Server or run on its own:
When running a Java-based web server, Tomcat can be used in “standalone” mode, which allows it to be used as a component to the web server. Tomcat will become a servlet container in your JSP environment that manages and invokes servlets on behalf of users. However, most web servers are not Java-based, which means you have to choose a different installation setup. When running Tomcat with Apache, you can run it “in-process” as an add-on servlet container, much like it would run in standalone mode but in conjunction with Apache. It runs as a combination of web server plugin and Java container implementation that runs in a JVM outside the web server. This method is great for multi-threaded, single-process servers and provides good performance at the price of scalability. The last installation method is “out-of-process”, which allows Tomcat to run as a combination of a web server plugin and Java container implementation that runs outside of the web server. Communication between the Java container JVM and the web server plugin happens using an IPC mechanism such as TCP/IP sockets. When a request comes in to the web server that requires a Servlet, the plugin takes over the request and passes it to the Java container. You get the opposite benefits of running “in-process” since the response time is not as optimal but the “out-of-process” method performs better in scalability and stability.Here are some points in favor of Tomcat over Apache httpd Web Server:
Provides the Java Servlet and JSP support for dynamically served pages Works as a light-weight testing server Can be run in different modes to promote better performanceIf you are interested in learning beyond the overview of each server, we provide both Apache trainingand Tomcat training courses as part of LearnComputer’s regular curriculum.
For users that need to run Java Servlets or JavaServer pages, Tomcat is definitely the best implementation for you. However, if you are running a lot of static pages or need other dynamic techniques, you may want to stick with the Apache Web Server and run Tomcat either in- or out-of-process to get the Java support that you need. Either way, you will know that you are running one of the best web servers available without having to pay unnecessary cost for it.