Apache Tomcat 7

Book description

Apache Tomcat is the most popular open-source de-facto Java Web application server, standard for today's Web developers using JSP/Servlets. Apache Tomcat 7 covers details on installation and administration of Apache Tomcat 7. It explains key parts of the Tomcat architecture, and provides an introduction to Java Servlet and JSP APIs in the context of the Apache Tomcat server.

In addition to basic concepts and administration tasks, Apache Tomcat 7 covers some of the most frequently used advanced features of Tomcat, including security, Apache web server integration, load balancing, and embedding Tomcat server in Java applications.

Finally, through a practical primer, it shows how to integrate and use some of the most popular Java technologies with Apache Tomcat 7. In summary, Apache Tomcat 7 offers both novice and intermediate Apache Tomcat users a practical and comprehensive guide to this powerful software.

What you'll learn

  • Install and set up Tomcat 7 on Windows and Unix platforms

  • Manage and deploy application deployed on Tomcat 7 using Manager Application

  • Secure Tomcat 7 server using security realms or HTTPS protocol

  • Embed Tomcat 7 server into your desktop Java application

  • Efficiently configure Tomcat 7 with Apache Web server

  • Configure data sources and mail sessions using JNDI in Tomcat

  • Configure logging for web applications deployed on Tomcat server

Who this book is for

This book is for those Web developers and/or Java programmers new to the open-source Apache Tomcat Web server. It's also for those new to the latest release, version 7.

Table of contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Authors
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Preface
  9. Chapter 1: Introduction to Apache Tomcat 7
    1. The Apache Tomcat Server
    2. The Architecture of Tomcat
    3. Installing and Configuring Tomcat
    4. Testing Your Tomcat Installation
    5. Summary
  10. Chapter 2: Deploying Web Applications to Tomcat
    1. The Tomcat Directory Structure
    2. Java Web Applications
    3. Manually Deploying Web Applications to Tomcat
    4. Configuring Hosts and Contexts
    5. Deploying a Web Application from Eclipse IDE
    6. Summary
  11. Chapter 3: Servlets, JSPs and ServletContext
    1. Servlets
    2. Java Server Pages
    3. Relationship Between Servlets and ServletContext
    4. Summary
  12. Chapter 4: Using Tomcat’s Manager Web Application
    1. What Is the Manager Web Application?
    2. Gaining Access to the Manager Web Application
    3. Accessing the Manager Web Application Using Web Interface
    4. Using a Text-Based Interface to Access Manager Web Application
    5. Summary
  13. Chapter 5: Persistent Sessions
    1. HTTP Sessions
    2. The Servlet Implementation of HTTP sessions
    3. Session Management in Tomcat
    4. Summary
  14. Chapter 6: Configuring Security Realms
    1. Security Realms
    2. MemoryRealm
    3. JDBC Realms
    4. JNDIRealm
    5. Accessing an Authenticated User
    6. Summary
  15. Chapter 7: Securing Tomcat with SSL
    1. Introduction to SSL
    2. Configuring Tomcat with SSL
    3. Secure Session Tracking with Tomcat
    4. Summary
  16. Chapter 8: Valves and Servlet Filters
    1. Introduction to Valves and Filters
    2. Tomcat Valves vs. Servlet Filters
    3. Configuring Tomcat Valves
    4. Configuring Servlet Filters
    5. Summary
  17. Chapter 9: Embedding Tomcat
    1. Requirements for Embedding Tomcat
    2. Embedded Tomcat Java Components
    3. Implementing a Sample Application with Embedded Tomcat
    4. Testing Servlets with Embedded Tomcat
    5. Summary
  18. Chapter 10: Integrating Apache Web Server
    1. What Is the Apache Web Server?
    2. Integrating Tomcat and Apache Web Server
    3. Load Balancing
    4. Summary
  19. Chapter 11: Integrating Spring MVC Framework
    1. Introducing Spring MVC
    2. Spring MVC Web Applications
    3. Summary
  20. Chapter 12: Logging in Tomcat
    1. Using Tomcat’s JULI Logging Library
    2. Using Log4j Library for Web Application Logging
    3. Web Application Logging Using Slf4j Library
    4. Summary
  21. Chapter 13: Configuring JNDI in Tomcat
    1. Introduction to JNDI
    2. Configuring the Database Connection
    3. Configuring Mail Session
    4. Summary
  22. Appendix A: The Server.xml File
    1. Containers
    2. Connectors
    3. Summary
  23. Appendix B: The Web.xml File
    1. The Basic web.xml Configuration
    2. Adding a Servlet Definition
    3. Adding a Servlet Filter
    4. Configuring ServletContext Parameters
    5. Configuring the Session
    6. Adding a Welcome File List
    7. Configuring Error Handlers
    8. Configuring Mime Types
    9. Configuring Web Application Security
    10. Summary
  24. Index

Product information

  • Title: Apache Tomcat 7
  • Author(s): James Goodwill, Aleksa Vukotic
  • Release date: September 2011
  • Publisher(s): Apress
  • ISBN: 9781430237235