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

Application Server and Web Server

kumaraswamy adurthi

Joined: Sep 27, 2005
Posts: 11
What is the difference between ApplicationServer and WebServer.
can any one please help me.

thanks in advance.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

A web server has the intelligence of a male model. It knows how to handle request, and map requests to files, and send those files to clients. That's what a web server is, basically - a remote mechanism for getting at static files such as images, mp3s, html files and stuff like that. It's a remote files system. Sure, you can add intelligence with PERL or PHP scripts, but that's small potatoes.

An application server is your intelligence. You can host logic components such as Servlets and JSPs on an application server. You can use the application server to make decisions about who can obtain what from your backend database. In fact, the application server is often thought of the middle tier, sitting between your client, that wants all sorts of information, and your back end database, that you want to secure and protect from those dastardly little clients.


-Cameron McKenzie
[ October 08, 2006: Message edited by: Bear Bibeault ]
nelson christos
Ranch Hand

Joined: Aug 08, 2006
Posts: 57
the client makes a request which is an http request which goes to the
web server which basically handles protocols like http,ftp...
if it is a request for static resource it will fetch it for the client but
dynamic response has to be generated then it will pass on the request to the application server (which goes by the name) to generate the response
give to the web server and back to the client

i think therefore i am
Rajesh Pitty

Joined: Jan 27, 2005
Posts: 9
Kumar ,

a webserver handles request of type http,ftp ,https...
if you need a dynamic response , say a list of states in a country
based on the selection of the country , is still possible in a webserver.

Servlets can invoke a POJO(Plain Old Java Object) which has the business logic or a database access logic , so that you will be able to generate a dynamic response.

but if you need transaction to be handled based on your request,
if you need more efficient object pooling ,
then these kind of services is provided by APPLICATION SERVERS

Rajesh<br /><a href="" target="_blank" rel="nofollow"></a>
Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146
Every Application Server (AS) is based on a particular Application Development Platform like .NET or J2EE. Though .NET is also a specification like J2EE that third party vendors can use to develop .NET compliant application server, there are not many .NET based application servers.

Depending on the platform it is based on every AS has to implement certain policies (security, caching, transaction control, authentication, data persistence etc.) For example, all J2EE servers have 'Web Container' (to host JSP, Servlets, Beans etc.) and 'EJB Container' (to host EJBs).

Web Servers have got HttpListeners (objects that react to every Http request they receive) which interpret the name and location of the resource requested and then send the resource to the requestor.

Almost all the AS today have an inbuilt WS and hence not only send the requested resource to the requestor, but also let you make a decision about sending it. Most of the AS are tuned to interact with backend databases and help the server side components for this purpose.

Apache Foundation's Tomcat is both a stand-alone servlet container (web container) used by other AS (like JBoss) and a web server. Weblogic, Websphere, Sun ONE Server are noted J2EE Application Servers.

Microsoft IIS and Apache Foundation's Apache Web Server are well known web servers.

Hope it helps.

Mallesh kumar

Joined: Oct 08, 2006
Posts: 2
Thanks for immediate responce

I agree. Here's the link:
subject: Application Server and Web Server
It's not a secret anymore!