# "Best" java servlet container?

## nephros

Hi!

I do a bit of java servlet development (mainly search & admin frontends for mysql databases), and was wondering which is the best server do deploy my webapps, and why.

The ones that I have found available are:

apache tomcat: the reference implementation, kind of de-facto standard, but seems a bit much for a simple database-frontend.

jetty not in portage, small, claims to be the fastest

orion claims to be easier in maintenance

resin also claims to be fastest, load balancing

the last three feel a bit leaner from the brief look I had at them.

So what are you recommendations, what are pros and cons?

----------

## thaldyron

My experiences using tomcat for a admin frontend for a mysql database:

The installation was quite easy (with gentoo) but the setup requires a bit of extra care especially if u want to integrate tomcat into apache because tomcat itself should not be run on port 80 (security).

A good hint is to activate the "automatic reload" (forgot the real name sorry) setting, because in the standard configuration you have to restart the server everytime you change something (which is very annoying...  :Confused:  ). But after i got everything up and running it was working without problems.

regards

----------

## nephros

 *thaldyron wrote:*   

> 
> 
> A good hint is to activate the "automatic reload" (forgot the real name sorry) setting, because in the standard configuration you have to restart the server everytime you change something (which is very annoying... :? )

 

I didn't know that. This is indeed very good news, because restarting really got on my nerves...

I suppose you mean this?

```
<!-- Define the default virtual host -->

      <Host name="localhost" debug="0" appBase="webapps"

       unpackWARs="true" autoDeploy="true" autoreload="true">
```

in $CATALINA_HOME/conf/server.xml right?

----------

## Donut

If you're interested in performance, the following link is an independant report released in about November last year which compares the performance of Tomcat, Orion, Resin, Jetty plus the servlet containers found in the IBM Websphere and Sun ONE application servers...

http://webperformanceinc.com/library/ServletReport/

Paul

----------

## mauricev

Does anyone know why tomcat has so many dependencies?

```

maurice@thewarehouse4 /config/common $ sudo emerge -pv tomcat

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] dev-java/java-config-1.2.11  15 kB 

[ebuild  N    ] dev-java/blackdown-jdk-1.4.2.01-r2  -doc -mozilla 36,432 kB 

[ebuild  N    ] dev-java/bsh-2.0_beta1-r1  -gnome -kde 303 kB 

[ebuild  N    ] dev-java/ant-core-1.6.2-r2  -doc 6,134 kB 

[ebuild  N    ] dev-java/log4j-1.2.8-r1  -doc 2,454 kB 

[ebuild  N    ] dev-java/avalon-logkit-bin-1.2.2  -doc 409 kB 

[ebuild  N    ] dev-java/commons-logging-1.0.4  -doc -jikes -junit 98 kB 

[ebuild  N    ] dev-java/libreadline-java-0.8.0-r1  -doc 75 kB 

[ebuild  N    ] dev-java/jython-2.1-r5  -jikes +readline 2,715 kB 

[ebuild  N    ] dev-java/jakarta-oro-2.0.8-r1  -doc -examples -jikes -source 337 kB 

[ebuild  N    ] dev-java/xerces-2.6.2-r1  -doc 5,200 kB 

[ebuild  N    ] dev-java/commons-net-1.2.2-r1  -doc -jikes -source 174 kB 

[ebuild  N    ] app-arch/unzip-5.50-r2  1,043 kB 

[ebuild  N    ] dev-java/jdepend-2.8.1  -doc -jikes 377 kB 

[ebuild  N    ] dev-java/jzlib-1.0.5  -doc -jikes 48 kB 

[ebuild  N    ] dev-java/gnu-crypto-2.0.1  -doc 3,804 kB 

[ebuild  N    ] dev-java/jsch-0.1.18  -doc -jikes 190 kB 

[ebuild  N    ] dev-java/jakarta-regexp-1.3-r2  -doc -jikes -source 124 kB 

[ebuild  N    ] dev-java/bcel-5.1-r1  -doc -jikes -source 12,338 kB 

[ebuild  N    ] dev-java/servletapi-2.3-r1  -doc -jikes 124 kB 

[ebuild  N    ] dev-java/bsf-2.3.0-r2  -doc -jikes -jython -rhino 1,021 kB 

[ebuild  N    ] dev-java/javacup-0.10k  186 kB 

[ebuild  N    ] dev-java/xalan-2.6.0-r2  -doc -jikes -source 5,737 kB 

[ebuild  N    ] dev-java/junit-3.8.1-r1  -doc -jikes 431 kB 

[ebuild  N    ] dev-java/antlr-2.7.3  1,316 kB 

[ebuild  N    ] dev-java/commons-collections-3.1  -doc -jikes 1,110 kB 

[ebuild  N    ] dev-java/commons-beanutils-1.7.0  -doc -jikes -junit 252 kB 

[ebuild  N    ] dev-java/rhino-1.5.5-r1  -doc -jikes 1,505 kB 

[ebuild  N    ] dev-java/ant-tasks-1.6.2-r5  -javamail -noantlr -nobcel -nobeanutils -nobsh -nocommonslogging -nocommonsnet -nojdepend -nojsch -nojython -nolog4j -nooro -noregexp -norhino -noxalan -noxerces 0 kB 

[ebuild  N    ] dev-java/ant-1.6.2-r6  0 kB 

[ebuild  N    ] dev-java/blackdown-jre-1.4.2.01-r1  -mozilla 14,103 kB 

[ebuild  N    ] dev-java/commons-pool-1.2  -doc -jikes -junit 263 kB 

[ebuild  N    ] dev-java/commons-dbcp-1.2.1  -doc -jikes 565 kB 

[ebuild  N    ] dev-java/commons-digester-1.6  -doc -jikes -junit 245 kB 

[ebuild  N    ] dev-java/saxpath-1.0  -doc -junit 2,115 kB 

[ebuild  N    ] dev-java/dom4j-1.5  -doc 11,300 kB 

[ebuild  N    ] dev-java/jdom-1.0_beta9-r1  -doc -jikes 3,337 kB 

[ebuild  N    ] dev-java/jaxen-1.0  -doc -junit 3,120 kB 

[ebuild  N    ] dev-java/commons-daemon-1.0  -doc -jikes 214 kB 

[ebuild  N F  ] dev-java/jmx-1.2.1  -doc -jikes 2,126 kB 

[ebuild  N    ] dev-java/servletapi-2.4-r1  -doc -jikes 3,560 kB 

[ebuild  N    ] dev-java/commons-el-1.0  -jikes 62 kB 

[ebuild  N    ] dev-java/commons-validator-1.1.3  -doc -examples -jikes -source 180 kB 

[ebuild  N    ] dev-java/commons-fileupload-1.0  -doc -jikes 29 kB 

[ebuild  N    ] dev-java/commons-lang-2.0-r1  -doc -jikes -source 430 kB 

[ebuild  N    ] dev-java/struts-legacy-1.0-r1  -doc -jikes 12 kB 

[ebuild  N    ] dev-java/struts-1.1-r2  -doc -jikes 9,711 kB 

[ebuild  N    ] dev-java/commons-httpclient-2.0.1  -doc -jikes 1,366 kB 

[ebuild  N F  ] dev-java/sun-jaf-bin-1.0.2  -doc 348 kB 

[ebuild  N    ] dev-java/commons-modeler-1.1  -doc -jikes 90 kB 

[ebuild  N    ] dev-java/commons-launcher-0.9  -doc -jikes 40 kB 

[ebuild  N    ] www-servers/tomcat-5.0.28-r2  -doc -examples -jikes 3,482 kB

```

whereas orion has very few

```
maurice@thewarehouse4 /usr/portage/dev-java/struts $ sudo emerge -pv orion

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] dev-java/java-config-1.2.11  15 kB 

[ebuild  N    ] dev-java/blackdown-jdk-1.4.2.01-r2  -doc -mozilla 36,432 kB 

[ebuild  N    ] app-arch/unzip-5.50-r2  1,043 kB 

[ebuild  N    ] www-servers/orion-2.0.5  6,849 kB 

```

and even fewer for resin

```

maurice@thewarehouse4 /usr/portage/dev-java/struts $ sudo emerge -pv resin

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] dev-java/java-config-1.2.11  15 kB 

[ebuild  N    ] dev-java/blackdown-jdk-1.4.2.01-r2  -doc -mozilla 36,432 kB 

[ebuild  N    ] www-servers/resin-3.0.8-r1  5,622 kB

```

Does it mean orion/resin are incomplete and can't do a lot of things that tomcat can do?

----------

## fugue88

 *mauricev wrote:*   

> Does anyone know why tomcat has so many dependencies?

 

Tomcat ships with Ant tasks so that your ant scripts can deploy, restart, &c, your webapps.  Most of the dependencies listed I believe are actually Ant's.

Frankly, I never use Tomcat's Ant tasks.

Cheers,

David

----------

## vivisected

i've used resin for a number of projects. i like it because is super easy to use, and (in my experience) faster than tomcat. but those are the only two i've tried.

----------

