Which one do you recommend for web and why?
Asked
Active
Viewed 2.0k times
37
-
5Glassfish is a full JavaEE app server. Tomcat is a servlet container. The comparison isn't especially meaningful. – skaffman Aug 24 '10 at 14:43
-
5I would recommend you describing your scenario or get this meaningless question deleted. – Darin Dimitrov Aug 24 '10 at 14:45
-
Web Profile is _almost_ close to just being a web container! – Thorbjørn Ravn Andersen Aug 24 '10 at 14:49
-
Not a real question and yet 24 upvotes! Chronic.. – fareed Mar 07 '13 at 07:36
1 Answers
38
I don't recommend any particular one. If you want just JSP/Servlet support, both suffices. If you want more than that (e.g. anything provided by the Java EE API which is much more than alone JSP/Servlet), then Tomcat simply don't suffice without manually adding a bunch of components on top of that to comply the complete Java EE API like JBoss AS is doing.
In (Eclipse) development terms, Tomcat is a quick starter and restarter, takes about 3 seconds. Glassfish is a slow starter, takes 5~10 seconds for a simple webapp, but it is an extremely fast hotdeployer (by this Glassfish Eclipse plugin). All happens in a subsecond while Tomcat usually takes 3 seconds for this (yes, Tomcat is then basically restarting itself).

BalusC
- 1,082,665
- 372
- 3,610
- 3,555
-
1How do you hotdeploy so fast? The Server Adapter is slow even with automatic publishing. – Thorbjørn Ravn Andersen Aug 24 '10 at 14:50
-
@Thor: Are you using v3? I can't remember it ever being slow. However, Glassfish v2 indeed used to be irritating slow in hotdeploys. Using their provided [Eclipse Plugin](https://glassfishplugins.dev.java.net/) btw. – BalusC Aug 24 '10 at 14:53
-
yes, Eclipse 3.6 with the Eclipse Plugin. I've now started with a clean Eclipse and downloaded the autodiscovered Glassfish plugin, and the default behaviour is still to require manual publishing. Have you set "Automatically publish when resources change" and lowered the interval to something less than the default 15 seconds? – Thorbjørn Ravn Andersen Aug 25 '10 at 09:31
-
@Thor: Yes, you need to set that as such. The interval is here just set to 0 (sorry for late comment, I discovered this dangling comment for the first when I received another upvote on this post a few minutes ago). – BalusC Jun 17 '11 at 16:24