Overview: GlassFish and Tomcat

GlassFish is the open source application server delivered by Sun Microsystems for the Java EE platform. which was originally launched by Sun in 2005. On 4 May 2006, Project GlassFish released the first version that supports the Java EE 5 specification.Currently it is avaiable for versions 3.0.1, 3.1, 3.2 and 4.0 with themes revolving around clustering, virtualization and integration with Coherence and other Oracle technologies. It is a fast, in security, production-quality, high expansibility, industry-leading Java EE containers.

Overview is free software, which under two free software licences: the Common Development and Distribution License (CDDL) and the GNU General Public License (GPL).Also commercially supported to adds an enterprise-quality app server to the options available to the open source community and builds on the foundation set by Sun Java System AppServer.

Apache Tomcat(or Jakarta Tomcat or simply Tomcat) is an open source software implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process.it is very popular in java commiunty. In general, applications that run on Tomcat will also run unchanged on GlassFish. Tomcat is supported Native Windows and Unix wrappers for platform integration.

GlassFish vsTomcat difference

Glassfish, JBoss, Websphere, etc. are heavy weight application servers that support the EJB standard and many more advanced features out of the box, GlassFish is a collection of Java EE containers, one of which is a Web container, Tomcat is only a Web container .

Web Container Feature Alignment: GlassFish vs Tomcat

Compounding the advantages of GlassFish Server and GlassFish Web Container over Tomcat, the GlassFish Community has provided support for well-known features of Tomcat within GlassFish. The table below summarizes the Tomcat features that are provided by GlassFish and the additional GlassFish capabilities not currently provided by Tomcat. Here is a table with ClassFish vs tomcat  features.

Pri Standard features Tomcat GlassFish v2 GlassFish v3
1 Tomcat valves Yes Yes Yes
2 mod_jk support Yes Yes Yes
3 Tomcat valves Yes Yes Yes
4 Webdav support Yes Yes Yes
5 CGI support Yes Yes Yes
6 Tomcat bug ixes Yes Yes Yes
7 Java EE certiied Yes
8 Servlet 2.5, JSP 2.1 Yes Yes
9 JSF 1.2 Yes Yes
10 Metro Web Services stack(NET interoperability) Yes Yes
11 jMaki (AJAX framework) Yes Yes
12 Jersey/JAX-RS 1.0 (RESTful Web Services) Yes Yes
13 Sophisticated Admin console and CLI Yes Yes
14 JMX Yes Yes
15 Node Agent and Cluster Management Yes
16 Upgrade Tool Yes
17 Application client container Yes
18 Java Webstart support Yes Yes
19 Tomcat bug ixes Yes Yes
20 JDBC Connection Pooling Yes Yes Yes
21 JTA/JTS Yes Yes
22 J2EE Connector Architecture 1.5 Yes Yes
23 Native jRuby/Rails deployment—no need for servlet container Yes
24 Rapid redeployment—maintain session state on redeploy Yes
25 Veriication tools Yes Yes
26 Image Packaging System (IPS) tools Yes
27 Grizzly(Java NIO) Yes Yes
28 Comet (HTTP Push) Yes Yes
29 CORBA Yes Yes
30 Modular architecture based on OSGi Yes
31 Embeddable Server Yes
32 Centralized admin of load balancer plug-in Yes
33 High availability Yes Yes
34 In-memory compilation of JSPs Yes
35 Integration with Identity Manager, Access Manager, Registry Server, and Java Business Integration Yes

GlassFish VS Tomcat Performance Comparison

GlassFish and Tomcat testing environment
Version: Sun Java System Application Server 9.1_02 (build b04-fcs) (glassfish stable version)
Tomcat 5.5.25
OS:  linux
Testing Tool: Jmeter
Target: jruby on rails

Tomcat Performance Results:

Label #Samples Average Median 90% Line Min Max Error % Throughput KB/sec
Http Request 400 12695 1390 41641 187 58031 20.75% 2.6/sec 153.7

GlassFish Performance Results:

Label #Samples Average Median 90% Line Min Max Error % Throughput KB/sec
Http Request 1000 25539 22453 39719 5109 83094 0.00% 3.7/sec 282.4


Oracle glassfish whitepaper