Java Interview Questions

February 13, 2010

Difference between web server and application server?

Filed under: Java Interview Questions — Sachin Kakkar @ 4:05 am
A Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call.
The Web server
A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds with an HTTP response, such as sending back an HTML page. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose, such server-side programs generate a response, most often in HTML, for viewing in a Web browser.
The application server
As for the application server, according to our definition, an application server exposes business logic to client applications through various protocols, possibly including HTTP. While a Web server mainly deals with sending HTML for display in a Web browser, an application server provides access to business logic for use by client application programs. The application program can use this logic just as it would call a method on an object (or a function in the procedural world).
Webserver is used only for jsp and servlets and for static functionality it has limited functionality and it doesn’t provide any security persistence and it doesn’t support EJB and JMS and JAAS like other functionality whereas Application server provide all functionalities
In simple words, Application Server = Web Server + EJB Container
Advertisement

1 Comment »

  1. One of my favorite question,good stuff. here is some other good questions quite interesting Top 20 core java interview questions you may like

    Comment by Anonymous — August 29, 2011 @ 1:45 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.