did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780131482609

Core Servlets and JavaServer Pages, Volume 2 Advanced Technologies

by ; ;
  • ISBN13:

    9780131482609

  • ISBN10:

    0131482602

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2007-12-27
  • Publisher: PEARSO
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $54.99

Summary

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 2presents 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 2explains 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 1presents 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.

Author Biography

Marty Hall is the president of coreservlets.com, a leading provider of Java training and consulting services. Marty has given courses on Java technologies in seven countries and dozens of U.S. venues, and directs the Java and Web-related concentration areas in the part-time Computer Science graduate program at the Johns Hopkins University. His books include all editions of Core Servlets and JavaServer Pages, More Servlets and JavaServer Pages, and Core Web Programming.

Larry Brown is an IT manager at a U.S. Navy Research and Development Laboratory, and coauthor of Core Web Programming, Second Edition (Prentice Hall, 2001).

Yaakov Chaikin, senior consultant at a software development company based in Columbia, MD, heads the Web Development track at Loyola College's graduate computer science program.

Table of Contents

Introductionp. xvii
Who Should Read This Bookp. viii
Conventionsp. xix
About the Web Sitep. xx
Acknowledgmentsp. xxi
p. xxii
Using and Deploying Web Applicationsp. 21
Purpose of Web Applicationsp. 3
Structure of Web Applicationsp. 5
Registering Web Applications with the Serverp. 9
Development and Deployment Strategiesp. 14
The Art of War: Bundling Web
Building a Simple Web Applicationp. 18
Sharing Data Among Web Applicationsp. 25
Controlling Web Application Behavior with Web.XMLp. 34
Purpose of the Deployment Descriptorp. 35
Defining the Header and the Root Elementp. 36
The Elements of web.xmlp. 37
Assigning Names and Custom URLsp. 42
Disabling the Invoker Servletp. 52
Initializing and Preloading Servlets and JSP Pagesp. 56
Declaring Filtersp. 68
Specifying Welcome Pagesp. 71
Designating Pages to Handle Errorsp. 72
Providing Securityp. 78
Controlling Session Timeoutsp. 83
Documenting Web Applicationsp. 84
Associating Files with MIME Typesp. 85
Configuring JSP Pagesp. 86
Configuring Character Encodingp. 93
Designating Application Event Listenersp. 93
Developing for the Clustered Environmentp. 95
J2EE Elementsp. 97
Declarative Securityp. 104
Form-Based Authenticationp. 106
Example: Form-Based Authenticationp. 122
Basic Authenticationp. 143
Example: Basic Authenticationp. 147
Configuring Tomcat to Use SSLp. 156
WebClient: Talking to Web Servers Interactivelyp. 164
Signing a Server Certificatep. 167
Programmatic Securityp. 178
Combining Container-Managed and Programmatic Securityp. 180
Example: Combining Container-Managed and Programmatic Securityp. 183
Handling All Security Programmaticallyp. 188
Example: Handling All Security Programmaticallyp. 190
Using Programmatic Security with SSLp. 195
Example: Programmatic Security and SSLp. 197
Servlet and JSP Filtersp. 202
Creating Basic Filtersp. 204
Example: A Reporting Filterp. 210
Accessing the Servlet Context from Filtersp. 217
Example: A Logging Filterp. 218
Using Filter Initialization Parametersp. 221
Example: An Access Time Filterp. 223
Blocking the Responsep. 226
Example: A Prohibited-Site Filterp. 227
Modifying the Responsep. 234
Example: A Replacement Filterp. 237
Example: A Compression Filterp. 245
Configuring Filters to Work with RequestDispatcherp. 251
Example: Plugging a Potential Security Holep. 253
The Complete Filter Deployment Descriptorp. 260
The Application Events Frameworkp. 266
Monitoring Creation and Destruction of the Servlet Contextp. 270
Example: Initializing Commonly Used Datap. 271
Detecting Changes in Servlet Context Attributesp. 277
Example: Monitoring Changes to Commonly Used Datap. 278
Packaging Listeners with Tag Librariesp. 288
Example: Packaging the Company Name Listenersp. 290
Recognizing Session Creation and Destructionp. 297
Example: A Listener That Counts Sessionsp. 298
Watching for Changes in Session Attributesp. 306
Example: Monitoring Yacht Ordersp. 307
Identifying Servlet Request Initialization and Destructionp. 314
Example: Calculating Server Request Loadp. 315
Watching Servlet Request for Attribute Changesp. 322
Example: Stopping Request Frequency Collectionp. 323
Using Multiple Cooperating Listenersp. 325
The Complete Events Deployment Descriptorp. 339
Tag Libraries: The Basicsp. 346
Tag Library Componentsp. 348
Example: Simple Prime Tagp. 353
Assigning Attributes to Tagsp. 357
Example: Prime Tag with Variable Lengthp. 359
Including Tag Body in the Tag Outputp. 362
Example: Heading Tagp. 364
Example: Debug Tagp. 368
Creating Tag Filesp. 371
Example: Simple Prime Tag Using Tag
Table of Contents provided by Publisher. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

Suppose your company wants to sell products online. You have a database that gives the price and inventory status of each item. However, your database doesn't speak HTTP, the protocol that Web browsers use. Nor does it output HTML, the format Web browsers need. What can you do? Once users know what they want to buy, how do you gather that information? You want to customize your site for visitors' preferences and interests, but how? You want to keep track of user's purchases as they shop at your site, but what techniques are required to implement this behavior? When your Web site becomes popular, you might want to compress pages to reduce bandwidth. How can you do this without causing your site to fail for those visitors whose browsers don't support compression? In all these cases, you need a program to act as the intermediary between the browser and some server-side resource. This book is about using the Java platform for this type of program."Wait a second," you say. "Didn't youalreadywrite a book about that?" Well, yes. In May of 2000, Sun Microsystems Press and Prentice Hall released Marty Hall's second book,Core Servlets and JavaServer Pages. It was successful beyond everyone's wildest expectations, selling approximately 100,000 copies, getting translated into Bulgarian, Chinese simplified script, Chinese traditional script, Czech, French, German, Hebrew, Japanese, Korean, Polish, Russian, and Spanish, and being chosen by Amazon.com as one of the top five computer programming books of 2001. What fun!Since then, use of servlets and JSP has continued to grow at a phenomenal rate. The Java 2 Platform has become the technology of choice for developing e-commerce applications, dynamic Web sites, and Web-enabled applications and service. Servlets and JSP continue to be the foundation of this platform--they provide the link between Web clients and server-side applications. Virtually all major Web servers for Windows, UNIX (including Linux), Mac OS, VMS, and mainframe operating systems now support servlet and JSP technology either natively or by means of a plug-in. With only a small amount of configuration, you can run servlets and JSP in Microsoft IIS, the Apache Web Server, IBM WebSphere, BEA WebLogic, Oracle Application Server 10g, and dozens of other servers. Performance of both commercial and open-source servlet and JSP engines has improved significantly.To no one's surprise, this field continues to grow at a rapid rate. As a result, we could no longer cover the technology in a single book.Core Servlets and JavaServer Pages, Volume 1: Core Technologies, covers the servlet and JSP capabilities that you are likely to use in almost every real-life project. This book,Volume 2: Advanced Technologies, covers features that you may use less frequently but are extremely valuable in robust applications. For example, Deployment descriptor file. Through the proper use of the deployment descriptor file, web.xml, you can control many aspects of the Web application behavior, from preloading servlets, to restricting resource access, to controlling session time-outs. Web application security. In any Web application today, security is a must! The servlet and JSP security model allows you to easily create login pages and control access to resources. Custom tag libraries. Custom tags significantly improve the design of JSPs. Custom tags allow you to easily develop your own library of reusable tags specific to your business applications. In addition to creating your own tags, we cover the Standard Tag Library (JSTL). Event handling. With the events framework, you can control initialization and shutdown of the Web application, recognize destruction of HTTP sessions, and set application-wide values. Servlet and JSP filters. With filters, you can apply many pre- and post-processing actions. Fo

Rewards Program