Working with Servlets

  • Sue Spielman
  • Meeraj Kunnumpurath
  • Neil Ellis
  • James L. Weaver

Abstract

Servlets form the basis for much of the Web application architecture in the Java 2 Enterprise Edition (J2EE) platform. Since being introduced back in 1996, they’ve become the de facto standard for how you deal with various elements of your server-side code. This chapter covers how to incorporate features now available within the Servlet 2.4 specification. During the course of this chapter, you’ll do the following:
  • You’ll examine the classes and interfaces of the Servlet application program- ming interface (API), focusing particularly on the javax.servlet package.

  • You’ll also consider the classes and interfaces related to the life cycle of a servlet.

  • You’ll look at the request/response cycle and the interfaces and classes associated with it.

  • You’ll look at document type definitions (DTDs) and Extensible Markup Language (XML) schemas; the deployment descriptor is now defined in terms of an XML schema document.

  • You’ll learn about lifecycle, attribute, request, and response event listeners, which are mechanisms for listening to events that may be of interest to an application.

  • You’ll learn about filters that give you the ability to configure filters to be invoked under the request dispatcher.

  • You’ll see best practices when dealing with servlets.

  • You’ll develop an application using the servlet classes and interfaces discussed in this chapter.

Keywords

Corn Caffeine Nism Dispatch J2ee 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Sue Spielman, Meeraj Kunnumpurath, Neil Ellis, and James L. Weaver 2004

Authors and Affiliations

  • Sue Spielman
  • Meeraj Kunnumpurath
  • Neil Ellis
  • James L. Weaver

There are no affiliations available

Personalised recommendations