Tomcat Apache

Tomcat is a free, feature-complete Servlet Container, it's goal is to be 100% compliant with the versions of the Servlet and JSP API specifications that it supports. Tomcat can be used in a small-business Production environment providing a very stable system. It can be used for many purposes from online photos to ETrading systems. The one problem with Tomcat as with a lot of open source software is the lack of documentation, there are a number of books on Tomcat which can help with installing, configuring and administrating and a number of web sites out in the internet that can help.

Tomcat History

One of the earliest web servers was developed by Rob McCool at the National Center for Supercomputer Applications (NCSA). In 1994 a group of developers got together and compiled all the NCSA bug fixes and enhancements they had found and patched them into the NCSA code base. This version was released in April 1995 and it was called "Apache" (A PAtCHy Web Server), within a year the Apache web server was the most populate web server in the world. The Apache web server can run on most operating systems, it is highly stable and is the most popular choice for a Production environment.

In 1999 the same people who wrote Apache formed the Apache Software Foundation (ASF), ASF is a non-profit organization that produce open-source software.

Tomcat is developed under the ASF, so its a open source project, and it was created in the earliest days of Java Servlet technology. Servlets are a certain type of Java application that plugs into special web servers, called Servlet containers. Tomcat is fully compliant with the Servlet and Java Server Pages (JSP) specification as published by Sun Microsystems.

The latest version of Tomcat, Tomcat 6 implements the Servlet 2.5 and JSP 2.1 specifications, it also boasts of an improved clustering implementation over Tomcat 5. Tomcat is an open source software and thus is free and freely distributable.

Java EE

Tomcat is a key component of a larger set of standards collectively referred to as the Java Enterprise Edition (Java EE) platform. The Java EE standard defines a group of Java-based API's that are suited to creating web applications for the Enterprise (large companies), they are especially designed to solve the problems associated with the creation of large software systems.

Java EE is built on the Java Standard Edition (Java SE), which includes the Java binaries (JVM, bytecode compiler) as well as the core Java code libraries. In recent's versions Java EE was called J2EE and Java Standard Edition was called J2SE.

Java API's is a kind of technical contract defining the functionality that two parties must provide: a service provider and an application, if this contract is agreed upon the API is pluggable (that is, a new service provider can be plugged into the relationship). API's are created and modified by a standards body called the "Java Community Process" (JCP), The JCP is composed of hundreds of Java Specification Requests (JSR's). Each JSR is a request to either change an existing aspect of Java or introduces a new API or feature to Java, anyone can influence the Java platform by submitting a JSR.

The Java EE platform consists of many API's, the servlet and JSP API's are two of these, a table below describes some of the others

Java EE API Description
Enterprise JavaBeans (EJB) Provides a mechanism to make life easy to use advanced features such as Remote Method Invocation (RMI), object/relational mapping, distributed transactions, statefulness, etc
Java Message Service (JMS) Provides high-performance asynchronous messaging, you can communicate with non-java systems.
Web Service APIs A set of API's for Web Services and XML processing. These include JAX-WS, JAX-RPC, JAXB, SAAJ and StAX.
Java Management Extensions (JMX) Standardizes a mechanism for interactively monitoring and managing applications at runtime.
Java Transaction API (JTA) Enables applications to gracefully handle failures in one or more of their components by establishing transactions. It allows a transaction to complete successfully or to rollback if not.
JavaMail Provides the capability to send and receive e-mail via the standard POP/SMTP/IMAP protocols
JNDI Java Naming and Directory Interface (now in Java SE)
JAXP The API for parsing, transforming and processing XML documents (now in Java SE)

Tomcat is a Servlet container and not a fully Java EE application server, there are many commercial Java EE Application servers on the market

Although many of the above vendors keep to the standard set by JCP, they incorporate many advanced features that are specific to their own Java EE Application Server, it unfortunately locks you into a vendors product, so make sure that you check its portability from one vendor to the next, when choosing a particular Java EE Application Server.

Tomcat does not support all the API's hence it is not a Java EE application server, it does support Servlet/JSP API's and provides JNDI and JMX API's. The JBoss Java EE application server makes explicit use of Tomcat, so if you plan only to use Servlet, JSP, JNDI and JMX API's then Tomcat would make an ideal solution, otherwise you would be better using one of the commercial Java EE application servers, especially if you plan to use EJB's.

Tomcat and Web Servers

Tomcat's purpose is to generate web content such as HTML and GIF files on demand, using changing data, this is said to be dynamic, where as web pages that never change are said to be static. A common setup is to use a Web server (Apache) to serve the static content, then use a Tomcat Server to serve the dynamic content, this increases performance as both servers are very good at there requested tasks. Tomcat can serve content from many different web servers but Apache is the web server that is best supported.