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

WebServer Vs. Application Server

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
I have an elimentary question about the architecture in which web applications are deployed.
Why do we need both the webserver and the Application Server for an application? For ex: Weblogic comes with built in webserver, in which we can deploy servlets and using which, we can server JSPs. But, one of the clients I've worked at uses Weblogic with Netscape Server. I've also seen another client use Weblogic all by itself, for an application that involved Servlets, JSPs and EJBs. Similarly, WebSphere seems to be tightly coupled with IHS(IBM HTTP Server, IBM's own flavor of Apache). Why do we need the web server when the Application Server comes with a built in web server?
-Bala Krishna
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
So you can choose an even better HTTP server if you like instead of being forced to use the one that comes with the App server..?

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Your answer does make sense to me. But, if you are deploying the servlets and in the App.Server(say, weblogic), and serving the JSPs thru the same, why use the HTTPServer at all? What purpose would it serve, other than dispatching the requests to the App.Server? Would it help in setting up clusters? I feel that there's something very basic, that I am missing here.
-Bala Krishna
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Yes, it's elementary. The reason is mostly performance. Java's no speed demon, and Java appservers do a lot of their work in Java code. For low-volume sites, the extra overhead is no problem, but if your website is named "Yahoo!", you obviously want to keep overhead down, so you have the non-Java requests handled by a low-overhead server.
The other reason is functionality. Servers like Apache have a wealth of add-on functionality that may not be readily available (or even meaningful) in a Java appserver environment.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: WebServer Vs. Application Server
It's not a secret anymore!