Getting started with Apache Tomcat

Servlets are deployed into a servlet container, which is the component that runs and keeps track of several aspects related to servlets. An example of a servlet container is Apache Tomcat (or simply Tomcat). Put succinctly, Tomcat is an open source web server and Java servlet container from the Apache Software Foundation (http://tomcat.apache.org). Tomcat is written in Java, and it implements both the Java servlet and the JSP specifications from Oracle Corporations. Being primarily a servlet container, Tomcat plays a central role in the lifecycle of servlets: it loads classes, instantiates and initializes servlets, maps URLs to servlets, enforces the correct access rights to servlets, and creates (or allocates) threads to run servlets. Roughly, Tomcat is to servlets and JSPs what the JVM is to desktop-based applications— nevertheless, keep in mind that Tomcat runs on the JVM.

Tomcat has a plethora of features, configurations, and options. It is possible to get by with knowing only a small part of all that (which we try to cover throughout this chapter), but you should know that there is a lot more to Tomcat than just downloading it and getting it up and running. However, an in-depth explanation of this full-fledged servlet container is out of the scope of this book. If you are looking for a detailed reference on how to get up to speed on using Tomcat, be sure to read Apache Tomcat 7 Essentials by Tanuj Khare.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset