wood burning stoves 2.0*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Containers Question" Watch "Apache Containers Question" New topic
Author

Apache Containers Question

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
Hi

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.


SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
Ben Souther
Sheriff

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Apache Containers Question