J2EE can be broken up into different technologies. You can split it into technologies EJBs and Servlet/JSPs.
So each requires a different "server/container" EJBs reside in an App Server containter, and Servlet/JSPs reside in a web server. an App Server container cannot serve up Servlets/JSP or HTML, but a web server can.
Some "App Servers" like JBoss and Oracle App Server come bundled with a Web Server.
Apart from Mark reply I want to add some more points
AppServer provides a lot of functioanlity which is not available with web server. If you want to use that functioanlity with Web server than you have to code yourself. AppServer is making the coders life simple so they can put their effort on logic.
babu hiran
Greenhorn
Joined: Jun 04, 2005
Posts: 12
posted
0
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.
Nila dhan
Ranch Hand
Joined: Sep 15, 2005
Posts: 160
posted
0
is that the only difference that appln server can generate dynamic output and web server cant?Is there no other difference ?I am not convinced with the answers provided.cud any one explain in detail?
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
posted
0
Originally posted by nila dhan: I am not convinced with the answers provided.cud any one explain in detail?
The lines have become more blurred recently so I'll start with first principles:
As Mark stated, application servers are 'Containers that manage multiple applications', fully blown J2EE app servers manage resources, object lifecycle s, clustering and a whole stack of other responsibilities. Originally application servers were interacted with via a 'servlet container' sub part typically for HTTP communication, but this is no longer necessary. You can talk directly to EJBs or expose the functionality in a number of ways.
Web servers were originally designed to serve static content and still have a number of features which mean they tend to do this better than servlet containers, but this is a rough guide rather than a rule. You can get 'add-ons' for web servers to get them to return dynamic content. These are typically based on the old CGI design (originally C and PERL) but now there are a number of languages you can write dynamic content with.
The lines blur since some application servers include web servers embedded, and web servers have ways to embed application-server behaviour. For example, Websphere includes IBM's own tailored Apache server. This Apache server is completely configured and controlled by the app server. I'd give some examples (maybe BroadVision, Vignette or ColdFusion?) on the opposite, but I'm not sure on my facts so I don't want to give mis-information.
Dave
Nila dhan
Ranch Hand
Joined: Sep 15, 2005
Posts: 160
posted
0
what are the components of a webserver and an application server.How is a request processed and the response generated in both the web and the appln server?