Originally posted by Hemant Agarwal:
My question is If we can use Tomcat as a standalone server than why we will ever need to combine apache + tomcat as a server
It used to be that Tomcat/Java was so much slower than Apache HTTPD when it came to serving static files that you had to combine them to get a production ready application. This is no longer the case. Most often, the gains you get by combining the two (if any) are not worth the hassle of administering both + the connector.
There are other reasons though.
If your app has components written in other technologies than
Java such as PHP or PERL, you may prefer to use HTTPD to handle those things. If you have huge amounts of static data and very little Java driven dynamic stuff, it may be more efficient to let HTTPD handle the static data.
Some people combine the two in order to bind to a port below 1024 on a unix box or to share an SSL certificate between different apps.
HTTPD can also be used as a load balancer for several instances of Tomcat.
In short, unless you have a compelling reason to do so, I wouldn't bother connecting the two. I would stick to Tomcat as a standalone until there is solid proof (in the form of a load
test) that life would be better with an HTTPD front end.