Web Server ->we can run only servlets jsp and html pages but not EJB'S.but it is possible in App server
web server cannot handle huge load , application server is for all types of protocols. My question is when to use web server
A web server (or a web server farm) can handle as much load as you design and scale them for, just like an app server. That's not a distinguishing characteristic.
Application server is best when compared to web server.
They generally do different things, so this statement doesn't make sense.
Then i can use app server in all situations, what is the necessity of web server.
You can also use a web server for all situations, and could ask "what is the need for an app server".
The question is: What makes sense architecturally? An app server might be used if there are frontends other than a web app (maybe a desktop app, remote systems, JMS, etc.) But the distinction is not always clear. Also note the difference betweeen an "app server" and a "JEE server". This may help clarify things: WebVsApplicationServer
Ping & DNS - updated with new look and Ping home screen widget
I would agree with Ulf and put my view or rather what I understand,
A web server would just serve the files those form Web Pages to the Users.. Its just like answering queries to the questions(asked by people simultaneously) by the person on the inquiry counter of an bank.
And for executing applications containing EJB's (which need EJB container) and other such modules which form a full fledged enterprise applications we need an Application Server.
An application server can play the role of a web server.