In short (but not exactly) - an application server is a web server with extra capabilities. More precisely, a web server is capable of serving HTML pages, if it has a preprocessor installed, it can handle php, if it has cgi capabilities, it can handle scripts (like perl), etc., etc. It can even serve applets to be ran on the client. It cannot however handle/process javaservlets and by extension, all of j2ee (ejbs, containers, etc.) in other words, applications . An application server is required for that. An application server, on the other hand, can handle much if not all of the web server functionality (many real world examples actually use just an application server to handle all of their needs, some of which may be better suited for a web server). It is often not optimized to do so, however, both in terms of performance and security. Some of the finer points of web servers (like SSI, PHP, etc.) may be a challenge to get working correctly on an application server. Therefore, most real world deployments use both servers, where the web server handles all initial requests and delegates some of them to the application server.
Web application Server - Provides only a Servlet Container, enables Servlets and JSP to run. An example of a Web server would be Tomcat.
Application Server - Provides a EJB Container, Servlet container. It also provides middleware services for security and state maintenance, along with data access and persistence. An example would be WebSphere, BEA, JBoss etc
Jason. [ March 06, 2006: Message edited by: Jason Moors ]
We don't have time for this. We've gotta save the moon! Or check this out: