Core Servlets and JavaServer Pages (JSP)

Core Servlets and JavaServer Pages (JSP)

3.24 (41 ratings by Goodreads)
By (author) 

List price: US$46.99

Currently unavailable

Add to wishlist

AbeBooks may have this title (opens in new window).

Try AbeBooks


-- Includes many portable, fully-documented, production-quality examples.
-- Provides setup and configuration details for the three leading free servlet/JSP engines: Apache Tomcat, the JSWDK, and the Java Web Server.
-- Advanced topics: Defining custom JSP tags, transmitting compressed pages, generating images and Excel spreadsheets, developing a shopping cart class, exploiting keep-alive HTTP connections, and JDBC connection pooling.Servlets and JavaServer Pages dramatically simplify the creation of dynamic Web pages and Web-enabled applications. With Java 2 Enterprise Edition (J2EE), these tools have come of age, earning the support of an unprecedented range of Web and application servers on every major operating system. This book is a comprehensive guide for every experienced developer who wants to master the new versions of these powerful tools. Start by mastering servlet syntax, installation and setup fundamentals and the servlet life cycle. Use cookies and session tracking, optimize browsers, compress pages to slash download time, and decrease overhead with persistent HTTP sessions. Next, master every key JavaServer Pages 1.1 technique you'll need: expressions, declarations, and scriptlets; controlling the format of the servlet that results from the page; incorporating reusable JavaBeans; sharing Beans among pages; dynamically including other files; defining your own JSP tag libraries, and combining servlets and JSP in a single application. Part III offers the industry's most in-depth, practical coverage of using applets and HTTP tunneling as servlet front ends, using JDBC and connection pooling, and HTML forms.
show more

Product details

  • Paperback | 608 pages
  • 172.72 x 233.68 x 43.18mm | 1,156.65g
  • Prentice Hall
  • Upper Saddle River, United States
  • English
  • 0130893404
  • 9780130893406

Table of contents

I. SERVLETS 2.1 AND 2.2.

1. Overview of Servlets and JavaServer Pages.

Servlets. The Advantages of Servlets Over "Traditional" CGI. JavaServer Pages. The Advantages of JSP. Installation and Setup.

2. First Servlets.

Basic Servlet Structure. A Simple Servlet Generating Plain Text. A Servlet That Generates HTML. Packaging Servlets. Simple HTML-Building Utilities. The Servlet Life Cycle. An Example Using Initialization Parameters. An Example Using Servlet Initialization and Page Modification Dates. Debugging Servlets. WebClient: Talking to Web Servers Interactively.

3. Handling the Client Request: Form Data.

The Role of Form Data. Reading Form Data from Servlets. Example: Reading Three Explicit Parameters. Example: Reading All Parameters. A Resume Posting Service. Filtering Strings for HTML-Specific Characters.

4. Handling the Client Request: HTTP Request Headers.

Reading Request Headers from Servlets. Printing All Headers. HTTP 1.1 Request Headers. Sending Compressed Web Pages. Restricting Access to Web Pages.

5. Accessing the Standard CGI Variables.

Servlet Equivalent of CGI Variables. A Servlet That Shows the CGI Variables.

6. Generating the Server Response: HTTP Status Codes.

Specifying Status Codes. HTTP 1.1 Status Codes and Their Purpose. A Front End to Various Search Engines.

7. Generating the Server Response: HTTP Response Headers.

Setting Response Headers from Servlets. HTTP 1.1 Response Headers and Their Meaning. Persistent Servlet State and Auto-Reloading Pages. Using Persistent HTTP Connections. Using Servlets to Generate GIF Images.

8. Handling Cookies.

Benefits of Cookies. Some Problems with Cookies. The Servlet Cookie API. Examples of Setting and Reading Cookies. Basic Cookie Utilities. A Customized Search Engine Interface.

9. Session Tracking.

The Need for Session Tracking. The Session Tracking API. A Servlet Showing Per-Client Access Counts. An On-Line Store Using a Shopping Cart and Session Tracking.


10. JSP Scripting Elements.

Scripting Elements. JSP Expressions. JSP Scriptlets. JSP Declarations. Predefined Variables.

11. The JSP page Directive: Structuring Generated Servlets.

The Import Attribute. The ContentType Attribute. The IsThreadSafe Attribute. The Session Attribute. The Buffer Attribute. The Autoflush Attribute. The Extends Attribute. The Info Attribute. The ErrorPage Attribute. The IsErrorPage Attribute. The Language Attribute. XML Syntax for Directives.

12. Including Files and Applets in JSP Documents.

Including Files at Page Translation Time. Including Files at Request Time. Including Applets for the Java Plug-In.

13. Using JavaBeans with JSP.

Basic Bean Use. Example: StringBean. Setting Bean Properties. Sharing Beans.

14. Creating Custom JSP Tag Libraries.

The Components That Make Up a Tag Library. Defining a Basic Tag. Assigning Attributes to Tags. Including the Tag Body. Optionally Including the Tag Body. Manipulating the Tag Body. Including or Manipulating the Tag Body Multiple Times. Using Nested Tags.

15. Integrating Servlets and JSP.

Forwarding Requests. Example: An On-Line Travel Agent. Including Static or Dynamic Content. Example: Showing Raw Servlet and JSP Output. Forwarding Requests From JSP Pages.


16. Using HTML Forms.

How HTML Forms Transmit Data. The FORM Element. Text Controls. Push Buttons. Check Boxes and Radio Buttons. Combo Boxes and List Boxes. File Upload Controls. Server-Side Image Maps. Hidden Fields. Grouping Controls. Controlling Tab Order. A Debugging Web Server.

17. Using Applets as Servlet Front Ends.

Sending Data with GET and Displaying the Resultant Page. A Multisystem Search Engine Front End. Sending Data with GET and Processing the Results Directly (HTTP Tunneling). A Query Viewer That Uses Object Serialization and HTTP Tunneling. Sending Data by POST and Processing the Results Directly (HTTP Tunneling). An Applet That Sends POST Data. Bypassing the HTTP Server.

18. JDBC and Database Connection Pooling.

Basic Steps in Using JDBC. Basic JDBC Example. Some JDBC Utilities. Applying the Database Utilities. An Interactive Query Viewer. Prepared Statements (Precompiled Queries). Connection Pooling. Connection Pooling: A Case Study. Sharing Connection Pools.

Appendix: Servlet and JSP Quick Reference.

Overview of Servlets and JavaServer Pages. First Servlets. Handling the Client Request: Form Data. Handling the Client Request: HTTP Request Headers. Accessing the Standard CGI Variables. Generating the Server Response: HTTP Status Codes. Generating the Server Response: HTTP Response Headers. Handling Cookies. Session Tracking. JSP Scripting Elements. The JSP Page Directive: Structuring Generated Servlets. Including Files and Applets in JSP Documents. Using JavaBeans with JSP. Creating Custom JSP Tag Libraries. Integrating Servlets and JSP. Using HTML Forms. Using Applets As Servlet Front Ends. JDBC and Database Connection Pooling.

show more

About Marty Hall

MARTY HALL is a Senior Computer Scientist at the Johns Hopkins University Applied Physics Lab and teaches Java and Web programming in the Johns Hopkins part-time graduate program in Computer Science and for various industry short courses. He is the author of the best-selling book Core Web Programming.
show more

Rating details

41 ratings
3.24 out of 5 stars
5 2% (1)
4 34% (14)
3 51% (21)
2 10% (4)
1 2% (1)
Book ratings by Goodreads
Goodreads is the world's largest site for readers with over 50 million reviews. We're featuring millions of their reader ratings on our book pages to help you find your new favourite book. Close X