Jay Serv Vs Tom Cat

JayServ? vs. ApacheTomcat

I'm in a position where I should actually know the answers to the following questions - but I don't know them - can you help ?

What are the advantages of actually using ApacheTomcat over Apache JServ ?

I am considering just using JServ because ApacheTomcat, when tried on Linux, does set the user.dir environment property to the current directory, i.e. the current directory at the moment you type /usr/local/bin/jakarata-tomcat/bin/startup.sh I basically don't see how I can provide a default directory to the servlets unless I go to the length of handing them one in a parameter manually in web.xml

In addition(rant alert!), why do people go crazy over XML when they can't even provide a matching dtd to server.xml, while at the same time telling you in their documentation that you should look at server.xml to find out how to use server.xml ?

--PeterSchaefer


What I do is set a new system property by changing the java command line:

export JAVACMD=java -Ddefault.dir=/usr/local/tmp

then the servlet code just needs to do System.getProperty("default.dir") instead of user.dir, and Bob's your uncle.

The main advantage of using ApacheTomcat that I can see is that it allows one to code to the current servlet specification rather than an old one. If that's not important to you, perhaps you shouldn't use it. -BrettNeumeier


Like Brett said, the main difference is the version of the API supported by the servlet container in question. JServ supports 2.0 while Tomcat supports 2.2 or 2.3. The different versions are incompatible at some points and you might very well run into situations where your code works for one container but not the other.

We're using JServ for an older application that doesn't work with any Servlet API after 2.0 and Tomcat for newer development here - keep away from Tomcat 3.1 BTW. Note that this means this application doesn't work with the latest versions of WebSphere or JRun either.

The main change between 2.1 and 2.2 is the concept of web applications. This makes it very easy to deploy your applications - and imposes some restrictions on the other side. I like this concept and it has been a driving force to switch to Tomcat for me. --StefanBodewig


Category Comparisons


EditText of this page (last edited January 26, 2003) or FindPage with title or text search