Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Apache and Tomcat questions

 
Ranch Hand
Posts: 50
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm studing the Java Enterprise and I have two questions about the servers.

1)
Why the Apache server (the HTTP Server) can manage php/perl/CGI by plug-in instead we need to use Tomcat for Servlet/JSp?
Why there isn't a plugin for that in Apache?

2)
I know Apache has an engine for the static contents, but in some projects Apache manages static pages and Tomcat manages the Servlet/JSP.
Why they aren't merged? (e.g. Tomcat with the Apache engine to manage the static pages)

Thanks
KK
 
Saloon Keeper
Posts: 23449
159
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Karim Kiswarday wrote:Hello,
I'm studing the Java Enterprise and I have two questions about the servers.

1)
Why the Apache server (the HTTP Server) can manage php/perl/CGI by plug-in instead we need to use Tomcat for Servlet/JSp?
Why there isn't a plugin for that in Apache?

2)
I know Apache has an engine for the static contents, but in some projects Apache manages static pages and Tomcat manages the Servlet/JSP.
Why they aren't merged? (e.g. Tomcat with the Apache engine to manage the static pages)

Thanks
KK



1. J2EE is a heavyweight framework. Although back in the early days, I see to recall some plugin capabilities for Apache-like webservers to run servlets (JSPs hadn't been invented yet), the complexity of modern-day J2EE servers means that it's no longer feasible. One of the things that distinguishes J2EE from CGI is that in CGI, you either have a lightweight scripting language or directly-executable binaries. Java requires firing up a JVM .

Apache is all about fast page service, with fairly light processing requirements. J2EE is more for heavy processing requirements.

2. In the early days, Apache often served up the static content because it could do so much faster than J2EE servers like Tomcat. That hasn't been true for a long, long time. Now Tomcat can serve up static content rapidly, so there's no longer any real need to have Apache do it.

There are still plenty of reason why Apache+Tomcat is common. One of which has to do with Apache's ability to serve up low-numbered tcp/ip ports (80 and 443) without running them under weakened security (root user). Another is to allow one server to be the "go to" point for both J2EE and non-J2EE (cgi/PHP, etc.) applications. There are other possible reasons as well.
 
The only cure for that is hours of television radiation. And this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic