May I know the differences between application servers and web servers? Please list examples of each.
A web server can sometimes act as an application server (for example, when it hosts web services). However, an application server does not have to be implemented as a web server. It can just listen on tcp sockets and act accordingly
web server is a container for simple operations like servlet/jsp container. application server is a container like web server but add more operations than web server like transactions manager, data source, clustering, load balance, messaging ,and others complicated business operations .
web server like apatche tomcat.
application server like jboss, glassfish, web sphere, oracle application server.
A 'web server' is generally any server program which serves content using the http (or https) protocols. These servers tend to listen on specific ports (80, or 443). The clients for these are generally web browsers like Chrome, Firefox or Internet Explorer.
Examples of web servers: Apache, Microsoft IIS
'Application server' is a far more fuzzy, less well defined term. It could refer to any program providing responses to client requests for a given application.
In the context of webserving, an 'application server' tends to refer to a higher level framework used to generate dynamic content. This could be some kind of container, within which you can deploy a particular 'web application'. Examples would include Apache Tomcat, WebSphere, JBoss etc.
In both cases, the term could also refer to the machine hardware which hosts software to do these things.