سؤال

We can add "container" to "http server". So, What's the difference between application server and http server & servlet container?

Geronimo,GlassFish,JBoss are an AS. What's Tomcat?

هل كانت مفيدة؟

المحلول

the marketing bs:

webserver:

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. http://httpd.apache.org/

servlet-container:

Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. http://tomcat.apache.org/

application-server:

GlassFish is a Java EE open source application server. GlassFish 3 provides a small footprint, fully featured implementation of Java EE 6. http://glassfish.java.net/public/users.html

to sum it up:

webserver

serves static webpages, or dynamic ones via some extension (php,perl,cgi,etc)

servlet-container

serves static webpages, or dynamic ones via java standard mechanisms

application-server:

think of it as a servlet-container on steroids :) It does everything as the servlet containers, and adds lot of standards based and proprietary features. (like JMS, EEB, JMX, JMQ and maybe even the kitchen sink too)

which one do you need?

Forget the webserver if you want to do some java-coding. Forget the servlet-container if you want to develop enterprise-grade applications. (That point is debatable, especially the meaning of enterprise-grade.) Take a look at current application-servers, compare their features. If you find a feature that would be a nice-to-have in your project, give it a go. Otherwise stick with the servlet-containers, they tend to have a smaller footprint anyways.

نصائح أخرى

Tomcat is a servlet container - a server that understands servlets and JSPs and serves them via HTTP protocol. Since servlets are part of Java EE, application servers need to include servlet container. But they also understand EJBs, provide JMS, etc.

HTTP server (like Apache web server) is something different. It basically delivers static content and can understand PHP, CGI, can connect to Tomcat providing load-balancing, etc.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top