Why use Glassfish instead of Apache? What's it strengths and weaknesses?

Robert Gould picture Robert Gould · Oct 6, 2008 · Viewed 57.5k times · Source

Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people use Glassfish.

Which made me wonder, why would I want to use Glassfish (in the sense that I'm interested, but I don't really understand why it might make my life easier). From what I read it's Sun's open-source derivate of Apache's Tomcat, thus I imagine it's a good (or great) quality product. But since I don't know its strengths and weaknesses, I don't know when it would be wise to choose Glassfish over another server. Could anyone elaborate ?

Answer

Shimi Bandiel picture Shimi Bandiel · Oct 6, 2008

GlassFish is an Application Server which can also be used as a Web Server (Http Server).

A web Server means: Handling HTTP requests (usually from browsers).

A Servlet Container (e.g. Tomcat) means: It can handle servlets & JSP.

An Application Server (e.g. GlassFish) means: It can manage Java EE applications (usually both servlet/JSP and EJBs).

You should use GlassFish for Java EE enterprise applications.