A web server can only understand the http request and serve that request with static pages(html,gig,jpeg etc). Whereas the application server may have web server embeded in it and apart from just understanding the http request it can also run the coressponding business logic(ejb) and generate the pages dynamically(
jsp) with the help of controller component(
servlet).
So when a request reaches a web server, it will only know which static page to show. Where as an application server can dynamically generate static html using its (servlet,jsp,ejb) containers.