File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Apache Containers Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Containers Question" Watch "Apache Containers Question" New topic

Apache Containers Question

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361

I am trying to understand how the apache web server works.I read in the head first servlets and JSP and the apache contains a container called tomcat and
that the tomcat is a java program that calls the servlets.I also know that the apache also can server php pages.Is there a seperate container for apache that is resposible for handling php requests.And how does the apache server distinguish between requests that come for php and requests that come for jsp and servlets.

Life is the biggest school
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

PHP is handled by native code within the apache web server (or, it can be).
Servlets need be be handled by a servlet container running under a Java virtual machine.

These days it is common for people to use Tomcat as a standalone server for their web applications. It is also a fully functional web server.
It's still possible to connect it to the apache webserver. To do so involves some bridge programs called 'connectors'. In the config files for these connectors, you would set up url-mappings for resources that you want handed from the Apache webserver to Tomcat.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Apache Containers Question
It's not a secret anymore!