What is the difference between application server and web server?

Application Server vs. Web Server?

  • I asked my teacher in class that Java Server Faces will work on Apache Tomcat. But he then corrected me saying that Tomcat is a Web Server not an Application Server, hence it will not run Java Server Faces. My question is what is the difference between an Application Server and a Web Server? What is it about Apache Tomcat that is can run JSPs and Servlets but not JSFs?

  • Answer:

    Tomcat is definitely an application server, as it will happily process Java server-side code in order to generate dynamic contents, while instead a "pure" web server (like Apache) can only serve static web pages; so your teacher is totally wrong here. What is right is that Tomcat doesn't provide native JSF support; but the more than 4500000 results shown by a simple Google search for http://www.google.it/#q=tomcat+jsf are quite explicit in showing that Tomcat can indeed run Java Server Faces.

prometheuspk at Server Fault Visit the source

Was this solution helpful to you?

Other answers

They're often the same, but technically an app server is not limited to HTTP requests, and is often behind a web server and provides "business logic" in the form of web service calls which are used to construct the actual resources requested by the end user. See this for more: http://www.javaworld.com/javaworld/javaqa/2002-08/01-qa-0823-appvswebserver.html JSP is a Java technology that allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request ( http://en.wikipedia.org/wiki/Java_Server_Pages ) hence, can be served by a webserver (tomcat). JSF is a Java-based Web application framework that simplifies the development of user interfaces for Java EE applications. Out of the box, JSF uses JavaServer Pages for its display technology... ( http://en.wikipedia.org/wiki/Java_Server_Faces ). That should explain it for you.

sandroid

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.