Book description
Build better web applications by learning how a servlet container actually works.
- Take your Java EE web programming skills to the next level by getting an expert's level understanding of the servlet specification and its reference implementation, Apache Tomcat.
- Build a Tomcat distribution from its source code, and explore the components, classes, and technologies that make up this container.
- Use standard development tools such as Eclipse, Ant, and Subversion to dissect a Tomcat distribution.
- Discover the touch points between the servlet specification and a servlet container's implementation.
- Acquire specialist grade skills in a range of technologies that contribute to Java server side development.
In Detail
While Tomcat is one of the most popular servlet containers, its inner workings still remain a mystery to many developers. If you only have a superficial familiarity of how this container actually functions, much of its power remains untapped and underutilized. This book will provide you with all that you need to undertand how to effectively use Apache Tomcat.
This book begins by providing detailed instructions on building a Tomcat distribution. The next few chapters introduce you to the conceptual underpinnings of web servers, the Java EE and servlet specifications, and the Tomcat container. Subsequent chapters address the key Tomcat components, taking care to provide you with the information needed to understand the internal workings of each component. Detailed examples let you walk through a Tomcat installation, stepping into key Tomcat components, as well as into your own custom servlets.
During the course of the book you will encounter various structural components such as the Server and Service; containers such as the Engine, Host, Context, and Wrapper; and helpers such as the Loader, Manager, and Valve. You will also see how Tomcat implements the JNDI API to provide both a directory service for storage agnostic access to its resources, as well as a naming service that implements the Java EE Environment Naming Context.
Along the way you will learn how various elements of the servlet 2.5 specification, as well as the HTTP RFCs are implemented by a servlet container. By the end of your journey, you will be able to count yourself as part of the elite minority of Java EE web developers who truly understand what goes on under the covers of a servlet container.
Table of contents
-
Tomcat 6 Developer's Guide
- Table of Contents
- Tomcat 6 Developer's Guide
- Credits
- About the author
- Acknowledgement
- About the reviewers
- Preface
- 1. Introduction to Tomcat
- 2. Servlet API Overview
- 3. Servlet Container Overview
- 4. Starting Up Tomcat
- 5. The Server and Service Components
-
6. The Connector Component
-
Connector classification
- Usage scenario
- Connector configuration
- The connector subsystem—a structural perspective
- Modeling the Request and Response
- Socket programming
- The connector subsystem—a dynamic perspective
- Receiving a request
- Summary
-
Connector classification
- 7. The Engine Component
- 8. The Host Component
-
9. The Context Component
- Aspects of the Context component
- Web application resources
- Shared library mechanism
- URLs and protocol handlers
- Java class loading
- Implementing a custom class loader
- Making a class available
-
Context initialization and startup
- Context initialization
-
Context startup
- Anti resource locking
- Setting up the Context's resources
- Setting up the Context's Loader
- Publish the work directory
- Setting up a servlet context
- Validating optional JARs
- Naming context
- Starting nested components
- Configuring the web application aspect
- Starting listeners
- Starting application filters
- Session manager and the background thread
- Loading servlets on startup
- Request processing
- Hot deploying a context
- Context example
- Summary
- 10. The Wrapper Component
- 11. The Manager Component
- Index
Product information
- Title: Tomcat 6 Developer's Guide
- Author(s):
- Release date: December 2009
- Publisher(s): Packt Publishing
- ISBN: 9781847197283
You might also like
article
Run Llama-2 Models Locally with llama.cpp
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …
book
Professional Apache Tomcat 6
Tomcat is the official reference implementation of Sun's servlet and JSP specifications, and Java developers must …
article
Reinventing the Organization for GenAI and LLMs
Previous technology breakthroughs did not upend organizational structure, but generative AI and LLMs will. We now …
book
Professional Java for Web Applications
The comprehensive Wrox guide for creating Java web applications for the enterprise This guide shows Java …