Pages

Sunday, January 20, 2013

Java Servlet Programming

Java Servlet Programming

A few years ago, the hype surrounding applets put Java on the map as a programming language for the Web. Today, Java servlets stand poised to take Java to the next level as a Web development language. The main reason is that servlets offer a fast, powerful, portable replacement for CGI scripts.
The Java Servlet API, introduced as the first standard extension to Java, provides a generic mechanism to extend the functionality of any kind of server. Servlets are most commonly used, however, to extend Web servers, performing tasks traditionally handled by CGI programs. Web servers that can support servlets include: Apache, Netscape's FastTrack and Enterprise Servers, Microsoft's IIS, O'Reilly's WebSite, and JavaSoft's Java Web Server.
The beauty of servlets is that they execute within the Web server's process space and they persist between invocations. This gives servlets tremendous performance benefits over CGI programs. Yet because they're written in Java, servlets are far less likely to crash a Web server than a C-based NSAPI or ISAPI extension. Servlets have full access to the various Java APIs and to third-party component classes, making them ideal for use in communicating with applets, databases, and RMI servers. Plus, servlets are portable between operating systems and between servers -- with servlets you can "write once, serve everywhere."
Java Servlet Programming covers everything you need to know to write effective servlets and includes numerous examples that you can use as the basis for your own servlets. The book explains the servlet life cycle, showing how you can use servlets to maintain state information effortlessly. It also describes how to serve dynamic Web content, including both HTML pages and multimedia data. Finally, it explores more advanced topics like integrated session tracking, efficient database connectivity using JDBC, applet-servlet communication, inter-servlet communication, and internationalization.

Table of Contents
  1. Chapter 1 Introduction

    1. History of Web Applications

    2. Support for Servlets

    3. The Power of Servlets

  2. Chapter 2 HTTP Servlet Basics

    1. HTTP Basics

    2. The Servlet API

    3. Page Generation

    4. Server-Side Includes

    5. Servlet Chaining and Filters

    6. JavaServer Pages

    7. Moving On

  3. Chapter 3 The Servlet Life Cycle

    1. The Servlet Alternative

    2. Servlet Reloading

    3. Init and Destroy

    4. Single-Thread Model

    5. Background Processing

    6. Last Modified Times

  4. Chapter 4 Retrieving Information

    1. Initialization Parameters

    2. The Server

    3. The Client

    4. The Request

  5. Chapter 5 Sending HTML Information

    1. The Structure of a Response

    2. Sending a Normal Response

    3. Using Persistent Connections

    4. HTML Generation

    5. Status Codes

    6. HTTP Headers

    7. When Things Go Wrong

  6. Chapter 6 Sending Multimedia Content

    1. Images

    2. Compressed Content

    3. Server Push

  7. Chapter 7 Session Tracking

    1. User Authorization

    2. Hidden Form Fields

    3. URL Rewriting

    4. Persistent Cookies

    5. The Session Tracking API

  8. Chapter 8 Security

    1. HTTP Authentication

    2. Digital Certificates

    3. Secure Sockets Layer (SSL)

    4. Running Servlets Securely

  9. Chapter 9 Database Connectivity

    1. Relational Databases

    2. The JDBC API

    3. Reusing Database Objects

    4. Transactions

    5. Advanced JDBC Techniques

  10. Chapter 10 Applet-Servlet Communication

    1. Communication Options

    2. Daytime Server

    3. Chat Server

  11. Chapter 11 Interservlet Communication

    1. Servlet Manipulation

    2. Servlet Reuse

    3. Servlet Collaboration

    4. Recap

  12. Chapter 12 Internationalization

    1. Western European Languages

    2. Conforming to Local Customs

    3. Non-Western European Languages

    4. Multiple Languages

    5. Dynamic Language Negotiation

    6. HTML Forms

    7. Receiving Multilingual Input

  13. Chapter 13 Odds and Ends

    1. Parsing Parameters

    2. Sending Email

    3. Using Regular Expressions

    4. Executing Programs

    5. Using Native Methods

    6. Acting as an RMI Client

    7. Debugging

    8. Performance Tuning

  1. Appendix Servlet API Quick Reference

  2. Appendix HTTP Servlet API Quick Reference

  3. Appendix HTTP Status Codes

  4. Appendix Character Entities

  5. Appendix Charsets

  6. Colophon


0 commentaires:

Post a Comment