1.WEB Server:
Understanding Web server, first you have to understand what is the Web? Web you can simply understand that the HTML page you see is the data element of the Web, and the applications that process these data elements are called Web servers, such as IIS, Apache. Web server and client to deal with the main information it is:session, request, response, HTML, JS, CS and so on.
2. Application Server:
Application server such as JSP, processing of non-regular web page (JSP file), he dynamically generated a Web page, the generated Web page is sent to the client (in fact, when the application server finished processing a JSP request and completed JSP generated HTML after its task is finished, The rest is the process of web processing).
3.WEB server connection to Application server:
Web servers are generally generic, and application servers are typically private, such as tomcat handling only Java applications and not aspx or PHP. While Apache is a Web server F (HTTP server), it later connects to the Tomcat application server to support Java.
4.Web Server and HTTP server
The basic function of Web server is to provide Web information browsing service. It only supports HTTP protocols, HTML document formats, and URLs. Mates with the client's Web browser. Because the Web server mainly supports the protocol is HTTP, so usually the HTTP server and the Web server is equal (there is no support other than HTTP protocol Web server, the author has not verified), said the same thing.
5.Web Server and Application server
The Web server Delivery (serves) page allows the browser to browse, whereas the application server provides a method (methods) that the client application can invoke (call). To be exact, you can say that theWeb server is dedicated to HTTP requests (request), but the application server is providing (serves) business logic for the application through a number of protocols.
In Java EE, for example, the Web server mainly handles static page processing and acts as a servlet container to interpret and execute servlet/jsp, while the application server runs business logic, primarily the Java EE API, such as EJB, Jndi, and JMX APIs, and includes transactional processing, Database connectivity, the application server provides more power than a Web server in an enterprise-class application.
6.Apache and Tomcat and IIS
Apache: In a Web server,Apache is a purely Web server that is often paired with Tomcat . It has powerful explanatory power over HTML pages, but does not explain the server-side scripting code (JSP/SERVLET) embedded within the page.
Tomcat: Early Tomcat was a Jsp/servlet interpretation engine embedded in Apache Apache+tomcat equivalent to iis+asp. Later Tomcat is no longer embedded in Apache, and the Tomcat process runs independently of the Apache process. Furthermore, Tomcat is already a standalone servlet and JSP container, and the business Logic layer code and interface interaction layer code can be separated. So, someone called Tomcat a lightweight application server .
IIS: Microsoft's early IIS is a purely Web server. Later, it embeds an ASP engine that interprets VBScript and JScript server-side code, which can be used concurrently as an application server. Of course, it doesn't compare with the Java EE Application Server at all, but, functionally speaking, it can be called the application server in principle. To be exact, it is a Web server with a bit of application server functionality.
7.Weblogic and WebSphere
Weblogic, WebSphere is undoubtedly the absolute application server because it can provide the powerful Java EE function.
For Tomcat in the middle, it can be used with pure Web server Apache, or as an application server to be deployed with the application server.
8.Tomcat and Application Server
Tomcat has always been considered an executor of the Servlet/jsp API, as well as the so-called servlet container . However, Tomcat does not only do this, it also provides the implementation mechanism for JNDI and JMX APIs. However, Tomcat is still not an application server because it does not provide support for most of the Java EE APIs.
For developers, choosing Tomcat is a great solution if you're looking to build Java Web applications using servlet, JSP, Jndi, and JMX Technologies, but to find support for other EE APIs, Finding an application server or using Tomcat as an application server is a good solution, and the third Way is to find a separate Java EE API implementation and then combine them with Tomcat. Although consolidation can bring about problems, this approach is most effective.
9.Tomcat and Web server
Tomcat is a container that provides support for Servlets and JSPs to run. Servlets and JSPs can generate dynamic Web content based on real-time needs. For Web servers, Apache only supports static web pages, and it is powerless to support dynamic Web pages, while Tomcat can serve dynamic Web pages and support static Web pages. Although it is not as fast as the usual Web server, it is not as rich as the Web server, but Tomcat is gradually expanding to support static content. Most Web servers are written in the underlying language, such as C, and take advantage of the features of the corresponding platform, so Tomcat written in plain Java is unlikely to be comparable to a Web server written in the underlying language .
In general, the large site is a combination of Tomcat and Apache, Apache is responsible for accepting all HTTP requests from the client, and then forwarding Servlets and JSP requests to Tomcat for processing. After Tomcat finishes processing, the response is passed back to Apache, and the final Apache returns the response to the client.
and to improve performance, a single Apache can connect multiple tomcat for load balancing .
Web server and Application server troubleshoot