Web Server vs Application Server

It is big question for web developer and web designer is "What is difference between Web Server and Application Server?" Here I am comparing the Web Server and Application Server with respect to Java/J2EE technology.

Web Server

  • First Web Server works on HTTP (Hyper Text Transfer Protocol) request/response cycle. It means server accept HTTP request and send response in the form of HTTP.
  • The HTTP request method can be HEAD, GET, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT and HTTP response can be static or dynamic. The dynamic response can be generated by Server Side scripting language. Like; CGI (Common Getaway Interface), ASP (Active Server Pages), JSP (Java Server Pages), SSJS (Server Side Java Script). The generated content can contain of HTML documents or any other content, which may be included in the document, like images, style sheets and JavaScript.
  • Web Server provides the environment to facilitate client request. When any request comes from client Web Server find the server side resource and delegate request to the resource which contains server side scripting language.
  • The Apache Tomcat is an example of Web Server.

Request cycle of Web Server

Response cycle of Web Server

Application Server

  • The Application server is a set of components which provide the method access from remote client. Remote client can be stand alone java application Web application or application server component itself. In J2EE term, application server component is EJB (Enterprise Java Beans), which prove the technique to call EJB components method from remote client.
  • All Java enabled application server contains Web Server also.
  • Java enabled application server works on RMI (Remote Method Invocation) concept.
  • In application server client/server communication is possible only through socket but developer concentrate only on business logic, not in Socket programming because middleware(Application Server) manages socket itself.
  • The following are common application servers - BEA WebLogic Application Server, GlassFish Application Server, JBoss Application Server

Architecture of Application Server

Share your valuable comment

Name :
Email Id : [ We will not publish your email id ]
Your Comment : [ Maximum 200 chars ]
Enter Security code :