tags:

views:

1849

answers:

4

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 ?

+4  A: 

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 JEE applications (usually both servlet/JSP and EJBs).

You should use Glassfish for J2EE/JEE enterprise applications.

Shimi Bandiel
That would mean Glassfish is what one could call a lean-mean Java Server, less general purpose than Apache, but more focused and optimized for Java Servlets?
Robert Gould
Yep, although Glassfish also has a very good HTTP handling framework.
Shimi Bandiel
+2  A: 

Elaborating Shimi, the need for a seperate Web server is mostly needed in a production environment. You would normally find a Application server to be suffice most of your development needs. A web server is capable of holding larger number of active sessions and connections, thus providing the necessary balance without performance costs.

Stick to a simple web server if you are only working with servlets/jsps. It is also to be noted that in a netbeans environment, glassfish has better support than other App servers. In the context of eclipse though, WSAD and JBoss seem to the preferred options.

questzen
+2  A: 

Elaborating @Questzen.blogspot.com Glassfish will soon release the modular kernel. This means that the containers you need start up and shutdown as you need them. I.e no EAR deployed, EJB container won;t start up. This seems to have made it very good for development as it can start and stop very quickly. This takes it a lot closer to development environments like Rails (where redeployment is a massive part of your development)

Andrew Harmel-Law
A: 

Glassfish/Java web hosting are a lot expensive than just apache[php/perl] web hsoting

ivanceras