text.skipToContent text.skipToNavigation
  1. Home
  2. Computer Science & IT
  3. Core Servlets and JavaServer Pages, Volume 2: Advanced Technologies

Core Servlets and JavaServer Pages, Volume 2: Advanced Technologies, 2nd edition

  • Marty Hall
  • Larry Brown
  • Yaakov Chaikin

Published by Pearson (December 27th 2007) - Copyright © 2008

2nd edition

Chosen format
View all
Core Servlets and JavaServer Pages, Volume 2: Advanced Technologies

ISBN-13: 9780132799546

Includes: Instant Access

This product is not available in your country

What's included

  • Instant Access

    You'll get instant access to the digital content.

Overview

Java EE is the technology of choice for e-commerce applications, interactive Web sites, and Web-enabled services. Servlet and JSP technology provides the link between Web clients and server-side applications on this platform. Core Servlets and JavaServer Pages, Volume 2: Advanced Technologies, Second Edition, is the definitive guide to the advanced features and capabilities provided by servlets and JSP.

Volume 2 presents advanced capabilities like custom tag libraries, filters, declarative security, JSTL, and Struts. Like the first volume, it teaches state-of-the-art techniques and best practices illustrated with complete, working, fully documented programs.

Volume 2 explains in detail the advanced tools and techniques needed to build robust, enterprise-class applications. You'll learn how to control application behavior through the web.xml deployment descriptor file, how to enhance application security through both declarative and programmatic methods, and how to use servlet and JSP filters to encapsulate common behavior. You'll also learn how to control major application lifecycle events, best practices for using JSTL, and how to build custom tag libraries. Volume 2 concludes with an in-depth introduction to the Jakarta Struts framework.

Complete source code for all examples is available free for unrestricted use at www.volume2.coreservlets.com. For information on Java training from Marty Hall, go to courses.coreservlets.com.

Volume 1 presents comprehensive coverage of the servlets and JSP specifications, including HTTP headers, cookies, session tracking, JSP scripting elements, file inclusion, the MVC architecture, and the JSP expression language. It also covers HTML forms, JDBC, and best practices for design and implementation.

Table of contents

INTRODUCTION     xvii

Who Should Read This Book     viii
Conventions     xix
About the Web Site     xx

ACKNOWLEDGMENTS     xxi
ABOUT THE AUTHORS     xxii

Chapter 1: USING AND DEPLOYING WEB APPLICATIONS     2

1.1     Purpose of Web Applications 3
1.2     Structure of Web Applications 5
1.3     Registering Web Applications with the Server 9
1.4     Development and Deployment Strategies 14
1.5     The Art of WAR: Bundling Web
1.6     Building a Simple Web Application 18
1.7     Sharing Data Among Web Applications 25

Chapter 2: CONTROLLING WEB APPLICATION BEHAVIOR WITH WEB.XML     34

2.1     Purpose of the Deployment Descriptor 35
2.2     Defining the Header and the Root Element 36
2.3     The Elements of web.xml 37
2.4     Assigning Names and Custom URLs 42
2.5     Disabling the Invoker Servlet 52
2.6     Initializing and Preloading Servlets and JSP Pages 56
2.7     Declaring Filters 68
2.8     Specifying Welcome Pages 71
2.9     Designating Pages to Handle Errors 72
2.10   Providing Security 78
2.11   Controlling Session Timeouts 83
2.12   Documenting Web Applications 84
2.13   Associating Files with MIME Types 85
2.14   Configuring JSP Pages 86
2.15   Configuring Character Encoding 93
2.16   Designating Application Event Listeners 93
2.17   Developing for the Clustered Environment 95
2.18   J2EE Elements 97

Chapter 3: DECLARATIVE SECURITY     104

3.1     Form-Based Authentication 106
3.2     Example: Form-Based Authentication 122
3.3     BASIC Authentication 143
3.4     Example: BASIC Authentication 147
3.5     Configuring Tomcat to Use SSL 156
3.6     WebClient: Talking to Web Servers Interactively 164
3.7     Signing a Server Certificate 167

Chapter 4: PROGRAMMATIC SECURITY     178

4.1     Combining Container-Managed and Programmatic Security 180
4.2     Example: Combining Container-Managed and Programmatic Security 183
4.3     Handling All Security Programmatically 188
4.4     Example: Handling All Security Programmatically 190
4.5     Using Programmatic Security with SSL 195
4.6     Example: Programmatic Security and SSL 197

Chapter 5: SERVLET AND JSP FILTERS     202

5.1     Creating Basic Filters 204
5.2     Example: A Reporting Filter 210
5.3     Accessing the Servlet Context from Filters 217
5.4     Example: A Logging Filter 218
5.5     Using Filter Initialization Parameters 221
5.6     Example: An Access Time Filter 223
5.7     Blocking the Re

For teachers

All the material you need to teach your courses.

Discover teaching material