Tuesday, October 11, 2005


Explain me the difference between Application server and Web server.

An Application server is more sophisticated and intelligent server when compared to a webserver. A webserver works on a request-response model. You make a request and it gives you the response. An application server does a lot more than that. It takes care of performance related features like Database connection pooling, bean instance pooling, transaction management, security etc. Application servers come into picture (as you rightly said)in n-tier architectures (where n is normally > 2)when you are using business components(like EJB) in a distributed architecture.

1)What is the role of application server in a n-tier architecture?

The role of an application server is to assist the business components with various things like transaction management, Instance pooling, Security and a host of other system level plumbing features, which are vital for an enterprise application. A web-server cannot provide these facilities.

2)Is the business logic stored only in the application server or in any other server too? What technologies are used to write the business logic?

Normally yes. The business logic is stored in the application server in the form of business components.(It is part of the j2ee specification).But you can also load your web components in the application server which might have a little of business logic and a lot of presentation. The technologies mostly used in the industry today to create business components are EJB, DCOM and CORBA.

3)Is Apache Tomcat server a Web server or a Application server or both?

TOMCAT is a webserver.

4. I think an Application server can also have the functionality of the Web server, am I right?

All J2EE application servers (from all vendors, including the reference implementation from Sun) come in two parts:

(1) A Web Container that implements the Servlet and JSP specifications

(2) An EJB container that implements the EJB specification.

Tomcat from the Apache consortium IS the Reference implementation of the Servlet specification. Likewise Jasper (which is part of Tomcat) is the reference implementation of the JSP specification.

The sun J2EE reference implementation does include Tomcat. You can download whichever one you need, based upon whether you just need servlets or JSP's, or EJB's also.

0 Comments:

Post a Comment

<< Home