Home > Store

Tomcat 5 Unleashed

Register your product to gain access to bonus material or receive a coupon.

Tomcat 5 Unleashed

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2004
  • Dimensions: 7-3/8" x 9-1/8"
  • Pages: 768
  • Edition: 1st
  • Book
  • ISBN-10: 0-672-32636-1
  • ISBN-13: 978-0-672-32636-3

Getting the most bang for their buck is a goal for every company, large or small. That is why open-source technologies are becoming so popular. However, organizations are often wary of the scalability, security and stability that open-source technologies offer. Tomcat Unleashed is a comprehensive guide that will show you how Tomcat 5.x can meet these expectations and more. Detailed, hands-on coverage of Tomcat 5.x will teach you how to deploy it at an enterprise level, as well as integrate it with other components, including databases, LDAP and web application frameworks. Get the most bang for your buck with Tomcat Unleashed.

Downloads

Downloads

All the code developed for the book in one convenient file for download - 90 kb -- code.zip

Sample Content

Online Sample Chapters

Administration Basics

Tomcat 5 Administration Basics

Table of Contents

Introduction.

I. TOMCAT FAST TRACK.

1. Tomcat Quickstart.

    Introducing Tomcat.

    Installing the Basic Tomcat 5.x Package.

      Prerequisites.

      Downloading Tomcat.

      Installation.

    Tomcat Directory Structure.

    Starting Tomcat.

    What Is a Web Application?

    Your First JSP Page.

    Installing the Windows Executable Tomcat 5.x Package.

    Installing Tomcat 4.x.

    Conclusion.

2. Configuration Basics.

    Productionalizing the Distribution.

    Tomcat 5 Directories.

    Tomcat 5 Configuration Files.

      server.xml.

      Tomcat Architecture Basics.

      server.xml Basics.

      Web Application Loading.

    Reorganizing Your Tomcat 5 Installation.

      Creating a New Deployment Area.

      Editing server.xml.

      Creating a Context Definition.

      Editing admin.xml and manager.xml.

      Testing.

    Productionalizing the Tomcat 4 Distribution.

      Tomcat 4 Directories.

      Tomcat 4 Configuration Files.

      Tomcat 4 server.xml.

      Adding a Context Definition for the unleashed Application.

    Conclusion.

3. Administration Basics.

    Introduction.

    Running Tomcat 5.

      Tomcat 5 bin files.

      Tomcat 5 Run Options.

      Running Tomcat 5 as a Service on Windows.

    Tomcat 5 Resources.

      Definitions.

    Installing MySQL.

      Downloading MySQL.

      Installing MySQL.

      Starting MySQL on Linux.

      Starting MySQL on Windows.

      Creating the Table.

    Creating the Database Connection Pool.

      Creating the JSP.

      Testing.

    Running Tomcat 4.

      Tomcat 4 bin files.

      Tomcat 4 Run Options.

    Tomcat 4 Resources.

    Conclusion.

4. Security Basics.

    The Five Layers of Security.

      Physical-Level Security.

      Operating System–Level Security.

      Network-Level Security.

      Server-Level Security.

      Application-Level Security.

    Tomcat Security Basics.

      Tomcat and OS Security.

      Tomcat and Network Security.

      Tomcat and Server Security.

      Tomcat and Application Security.

    Running Tomcat Securely.

      Running Tomcat as a Nonroot User on Unix.

      Running Tomcat as a Non-administrative User on Windows.

    Tomcat 5 Authentication Example.

      Creating the Password File.

      Digesting Passwords.

      Configuring the Memory Realm.

      Editing web.xml.

      Testing.

      Running the Authentication Example on Tomcat 4.

    Conclusion.

II. DEVELOPING TOMCAT-BASED WEB APPLICATIONS.

5. Overview of J2EE Application Development.

    Web Applications.

    What Is J2EE?

      J2EE Tiers.

      J2EE in a Services Model.

      J2EE Containers.

      J2EE Interfaces.

      J2EE Specifications.

      J2EE Reference Implementation.

    Basic J2EE Concepts.

      Web Containers.

      Web Applications.

      Servlets.

      JSPs.

      Scope.

    Basic Objects.

      HttpServlet.

      ServletConfig.

      ServletContext.

      HttpServletRequest.

      HttpServletResponse.

      HttpSession.

    Conclusion.

6. Web Application Development Principles.

    Use What Works.

    Development Methodologies.

      Requirements and Design.

      Prototyping.

      Development Orientation.

      Testing.

    Web Application Development.

      Planning.

      Design.

      Development and Testing.

      Deployment.

    Development Issues.

      Technology.

      Environment.

      Software Resources.

      Security.

      Maintenance.

      Application Design.

    Conclusion.

7. Web Application Design.

    Who Needs Design?

    What Is Design?

    What Makes and Breaks Designs.

      What Makes for Good Design .

      What Makes a Great Design .

      What Breaks a Design.

    The World of Design Fashions.

      Design Agility.

      Patterns…and the Evil Antipatterns.

      To UML or Not to UML.

    Basic J2EE Design Principles.

      MVC.

      Model 1 and Model 2.

      Patterns in Action.

    Design Pattern + Implementation = Framework.

      Do You Want a Framework?

      A Framework Menu.

    Conclusion.

8. Setting Up a Development Environment.

    What Makes an Environment?

      The Five Key Elements.

      The Key Principles.

      IDEs.

    Building Your Environment.

      Setting Up the Directories.

      Gathering the Tools.

      Setting Up the Runtime Environment.

      Setting Up the Core Tasks.

      Setting Up Source Control.

    Test and Production Environments.

    Conclusion.

9. Developing with JSPs.

    JSP Basics.

      Directive Elements.

      Scripting Elements.

      Actions.

      Scopes.

      Taglibs.

      EL.

    A JSP Calendar.

      First taglib.

    Using JSTL.

      Installing JSTL.

      Using the Core and SQL Tag Libraries.

      Using the SQL Tag Library with a Connection Pool.

      Using the Functions Tag Library with Conditions.

    JSPs as XML Documents.

      Using the JSTL 1.0 Core and SQL Tag Libraries.

    Conclusion.

10. Developing with Servlets.

    Servlet Basics.

      Responding to Requests.

      Everything Has a Context.

      Servlet Lifecycle.

      Servlet Objects.

    A Simple Servlet.

    (Not) Using the Invoker Servlet.

    My First Controller Servlet.

      Requester JSP.

      Scheduler Servlet.

      The Helper Object.

      The Reservation JavaBean.

      Reservation Response JSP.

      Assembling the Application.

    Emailing from a Servlet.

    One Servlet or Many.

    Conclusion.

11. Web Application Basics.

    The Web Application.

    The Web Application and the J2EE Application.

      Platform Roles.

    How to Configure a Web Application.

      Overview of Configuration Methods.

      Configuration Testing Servlet.

      Info Dumper Servlet.

    Configuration Best Practices.

      Java System Parameters.

      Context Parameters.

      Servlet Parameters.

      Custom Configuration File.

      JNDI Parameters.

    Understanding web.xml.

      General Parameters.

      Context Parameters.

      Filters and Filter Mappings.

      Listeners.

      Servlets and Servlet Mappings.

      Session Configuration.

      Welcome File List.

      Error Pages.

      JSP Configuration.

      Security Information.

      JNDI Parameters.

      References.

    Packaging Your Application.

    Conclusion.

12. Developing Secure Applications.

    Defining Web Application Security.

      FORM Authentication.

      Mapping Role Names.

    Programmatic Security.

    Sessions.

    Writing a Session Listener.

    Application Security Holes.

      XSS Examples.

      HTML Injection Example.

      SQL Injection.

    Writing Security Applications

      Filter User Input.

      Keep Sensitive Information Out of the Session.

      Document Potential Hack Points.

      Keep Comments Out.

      Lock Down Resource Access.

      Keep Current.

    Conclusion.

13. Advanced Application Development.

    Dynamic Output with XSLT.

    XSLT Essentials.

    XSLT Technologies.

    Using an XSLT Filter.

      Writing the XSLT Filter.

      Converting the Content to XML.

      Writing an Application Listener.

      Writing the XSL Stylesheet.

      XSLT in Action.

    Using the XML Taglib for XSLT.

    Using a Controller Servlet for XSLT.

      Guidelines for Using XSL in Web Applications.

    Logging.

      Log4j Quickstart.

      Basic Logging.

      Custom Handling of XSLT Errors.

      Automating Alerts.

    Using Transactions.

      Installing JOTM.

      Creating the User Schedules.

      Testing.

      Conclusion.

III. TOMCAT ADMINISTRATION.

14. Enterprise Tomcat.

    What Is the “Enterprise?”

    What Is Open Source Software?

    The OSS Enterprise.

    Rules for Starting an OSS Enterprise .

      Rule #1: Know Your Components.

      Rule #2: Avoid Version Mania!

      Rule #3: Plan, Plan, Plan.

      Rule #4: Don’t Take Security for Granted.

      Rule #5: Don’t Put All Your Eggs in One Basket.

      Rule #6: Choose Your Path Carefully.

      Rule #7: Have a Support Plan .

      Rule #8: Understand OSS Licenses .

    Tomcat in an OSS-Based Enterprise.

    Rules for Starting an OSS Enterprise with Tomcat.

    Tomcat and OSS J2EE.

    Conclusion.

15. Tomcat Architecture.

    The Tomcat Source Code.

      The Tomcat 5 Source Code.

      The Tomcat 4 Source Code.

    Overall Architecture.

      Tomcat Connector Architecture.

      Coyote Request Processing.

      Tomcat Request Processing.

      Tomcat Startup.

    Class Loading.

      JVM Class Loaders.

      Tomcat Class Loaders.

      All You Need to Know About XML and Java.

    JMX, Managed Beans, and Tomcat.

    Conclusion.

16. Tomcat Configuration.

    Configuration Basics.

      Tomcat Configuration Principles.

      Virtual Hosts.

      Web Applications.

      Directories.

      Logging.

    Configuration of Tomcat 5 Container Elements.

      Server.

      Service.

      Engine.

      Host.

      Context.

    Configuration of Tomcat 5 Connector Elements.

    Configuration of Tomcat 5 Nested Components.

      DefaultContext.

      LifecycleListener.

      Loader.

      Logger.

      Manager.

      Realm.

      Resources.

      Valve.

      Configuration of Tomcat 5 Configuration Parameters.

      Conclusion.

17. Administering Tomcat.

    Installing Tomcat.

      Preparing Your Environment.

      Doing Your Research.

      Productionalizing Tomcat.

      Testing.

    Upgrading Tomcat.

      Upgrading Tomcat 4.x to 5.x.

    Running Tomcat.

      Using JSVC.

      Running Tomcat from the Launcher.

      Running Tomcat Tools.

      Running Tomcat with a JRE.

    Application Deployment.

      Deployment on Startup.

      Automatic Deployment While Tomcat Is Running.

      Manual Deployment While Tomcat Is Running.

      Application Deployment Rules.

    Running Multiple Tomcat Instances.

      Defining Fictitious Hosts.

      Creating the New $CATALINA_HOME.

      Creating Instance Directories.

      Preparing the bin Files.

      Preparing the conf Files.

      Preparing the Context Descriptors.

      Creating Sample Deployment Files.

      Testing.

      Starting Multiple Instances with the Launcher.

      Running User-specific Instances.

    Conclusion.

18. Tomcat Administration Tools.

    Introducing the Manager Application.

      Enabling Access to the Manager Application.

    Using Manager via URL Commands.

      Deploying an Application.

      Removing a Web Application.

      Listing Global JNDI Resources.

    Using the HTML Version of Manager.

    Using Manager with Ant.

    Using Manager Effectively.

    Introducing the Admin Application.

    JMX and Tomcat.

      Manager JMX Command.

      Writing Our Own MBean.

      A Simple MBean Web Page.

    Conclusion.

19. Advanced Administration.

    Balancer.

    Session Persistence.

    WebDAV.

    ISP Considerations.

      Organization.

      Processes and Tools.

      Running Multiple Tomcats.

      Deployment Strategies.

      User Directories.

    Clustering.

    Conclusion.

20. Tomcat—Web Server Integration.

    Some History.

    Integrating Tomcat and Apache with mod_jk.

      Installing Apache.

      Installing mod_jk.so.

      Creating workers.properties.

      Editing Apache httpd.conf.

      Testing.

    Using mod_jk with Multiple Tomcats.

      Load Balancing with mod_jk.

      Setting Up a Load Balancing Test.

      Changing Load Balancing Behavior.

      Session Management.

    Mod_jk Performance and Tuning.

    Integrating Tomcat and Apache 2 with mod_jk2 and Socket Channel.

      Mod_jk2 Basics.

      Downloading mod_jk2.

      Configuring Tomcat for mod_jk2.

      Configuring Apache for mod_jk2.

      Testing.

    Using mod_jk2 with Virtual Hosts.

    Load Balancing with mod_jk2.

    Integrating Tomcat and Apache with Mod_proxy.

    Conclusion.

21. Administering JNDI Resources.

    JNDI Basics.

      Defining Resources in Tomcat.

      Resource References.

      JNDI Parameters.

    Database Connections via JNDI.

    Emailing with JNDI.

    Getting JavaBeans from JNDI.

    Writing a Resource Factory.

     Conclusion.

22. Tomcat Security.

    Tomcat and Enterprise Security.

    LDAP Authentication.

      Installing OpenLDAP.

      Adding data to OpenLDAP.

      Viewing Data in OpenLDAP.

      Setting Up the JNDI Realm.

    JAAS.

      JAAS Authentication.

      Using JAAS.

      A Simple JAAS Example.

      Setting up Tomcat for JAAS.

      NT Domain Authentication.

    Writing Your Own JAAS LoginModule.

    Kerberos Authentication.

      Testing the Krb5LoginModule.

      Krb5LoginModule and Tomcat.

    Where to Go Next with JAAS.

    Single Sign-on with CAS.

    Single Sign-on in Tomcat.

      JDBCRealm.

      DataSourceRealm.

    SSL in Tomcat.

      Creating Server-side Certificates.

      Requiring SSL Communication.

      Creating Client-side Certificates.

    Best Practices.

      Choosing the Right Realm.

      Running Tomcat Securely.

    Conclusion.

23. Tomcat Performance and Tuning.

    Tomcat Tunables.

    Load Testing.

    Tuning Tomcat.

      Connectors.

      Memory.

      Sessions.

      Logging.

      Request Pipelines.

      Startup/Shutdown.

      Authentication Mechanisms.

      External Resources.

    Appplication Testing.

    Conclusion.

IV. ADVANCED TOPICS.

24. Customizing Tomcat.

    Writing a MissingPageValve.

      Simple MissingPageValve.

      Writing a Response with the MissingPageValve.

      The Final MissingPageValve.

      Where to Go Next.

    Writing a Listener.

    Conclusion.

25. Embedded Tomcat.

    Embedding Basics.

      Creating the Sample Web Application.

      Setting Up the WebAppServer Environment.

      Writing the Code.

      Testing the WebAppServer.

    Running WebAppServer from a CD.

    Enhancing the WebAppServer.

    Conclusion.

26. Tomcat and EJB Servers.

    Tomcat and OpenEJB.

    A Simple EJB.

      Writing the Bean.

      Compiling and Deploying the Bean.

      A Test JSP.

      Configuring Tomcat.

      Starting OpenEJB and Tomcat.

    Tomcat and OpenEJB in the Same JVM.

    Using the OpenEJB Web Application.

    Using an Entity Bean.

      Writing the EJB.

      Configuring OpenEJB.

      Compiling and Deploying the Bean.

      Modifying the Scheduler Application.

      Configuring Tomcat.

      Starting OpenEJB and Tomcat.

    Conclusion.

Index.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020