Book description
Companion to the worldwide bestseller Core Servlets and JavaServer Pages
Practical guide to the use of the Java Platform for Web-enabled applications and dynamic Web sites
Focus on new capabilities: the servlet 2.3 and JSP 1.2 specifications, the standard JSP tag library (JSPTL), filters, life-cycle event listeners, security, Web applications, and much more
Configuration and usage details for Apache Tomcat, Macromedia JRun, and New Atlanta ServletExec
The Java 2 Platform has become the technology of choice for developing professional e-commerce applications, dynamic Web pages, and Web-enabled applications and services. Servlet and JSP technology is the foundation of this platform: it provides the link between Web clients and server-side applications. But, the field has been evolving rapidly, and few developers have been able to keep up. In this companion to Core Servlets and JavaServer Pages, Marty Hall shows you how to apply recent advances in servlet and JSP technology. The book provides everything you need to know to leverage the latest servlet 2.3 and JSP 1.2 standards: real-world insight, advanced techniques, industrial-strength code, and hands on coverage of three top servers: Apache Tomcat, Macromedia JRun, and New Atlanta ServletExec.
Part I gives a thorough introduction to programming with servlet and JSP technology. It shows you how to configure your server, read form data and HTTP headers, handle cookies, track sessions, apply JSP scripting elements, use JavaBeans components, develop JSP tag libraries, and apply the MVC architecture.
Part II provides exhaustive details on Web application development and deployment. It explains how to register Web applications, how to organize them, how to deploy them in WAR files, how to deal with relative URLs, and how to share data among Web applications. It also gives details on every element in version 2.3 of the deployment descriptor (web.xml).
Part III describes Web application security in detail. It explains two general strategies for securing your applications: declarative security and programmatic security. Within each of these strategies, it shows you how to use form-based or BASIC authentication and how to protect your network traffic with SSL.
Part IV covers two features introduced with servlets 2.3: filters and life-cycle events. It explains how to use filters to debug, modify, and optimize the output of previously existing servlets and JSP pages. It also shows you how to use event listeners to respond to major events in the server life cycle.
Part V looks at new tag library developments. It shows you how to improve your own tag libraries by making use of new capabilities of the JSP 1.2 specification and explains how to streamline your code by using the new standard JSP tag library (JSPTL).
More Servlets and JavaServer Pages delivers:
The same clear, step-by-step explanations that make Marty's books so popular
In-depth, hands-on coverage of the latest standards: servlets 2.3 and JSP 1.2
Hundreds of completely portable, fully documented, industrial-strength examples
On-line access to all source code, available free for unrestricted use
Table of contents
- Copyright
- Acknowledgments
- Introduction
-
The Basics
-
Server Setup and Configuration
- Download the Java Development Kit (JDK)
- Download a Server for Your Desktop
- Change the Port and Configure Other Server Settings
- Test the Server
- Try Some Simple HTML and JSP Pages
- Set Up Your Development Environment
- Compile and Test Some Simple Servlets
- Establish a Simplified Deployment Method
- Deployment Directories for Default Web Application: Summary
-
A Fast Introduction to Basic Servlet Programming
- The Advantages of Servlets Over “Traditional” CGI
- Basic Servlet Structure
- The Servlet Life Cycle
- The Client Request: Form Data
- The Client Request: HTTP Request Headers
- The Servlet Equivalent of the Standard CGI Variables
- The Server Response: HTTP Status Codes
- The Server Response: HTTP Response Headers
- Cookies
- Session Tracking
- A Fast Introduction to Basic JSP Programming
-
Server Setup and Configuration
-
Web Applications
- Using and Deploying Web Applications
-
Controlling Web Application Behavior with web.xml
- Defining the Header and Root Elements
- The Order of Elements within the Deployment Descriptor
- Assigning Names and Custom URLs
- Disabling the Invoker Servlet
- Initializing and Preloading Servlets and JSP Pages
- Declaring Filters
- Specifying Welcome Pages
- Designating Pages to Handle Errors
- Providing Security
- Controlling Session Timeouts
- Documenting Web Applications
- Associating Files with MIME Types
- Locating Tag Library Descriptors
- Designating Application Event Listeners
- J2EE Elements
- A Sample Web Application: An Online Boat Shop
- Web Application Security
-
Major New Servlet and JSP Capabilities
-
Servlet and JSP Filters
- Creating Basic Filters
- Example: A Reporting Filter
- Accessing the Servlet Context from Filters
- Example: A Logging Filter
- Using Filter Initialization Parameters
- Example: An Access Time Filter
- Blocking the Response
- Example: A Prohibited-Site Filter
- Modifying the Response
- Example: A Replacement Filter
- Example: A Compression Filter
- The Complete Filter Deployment Descriptor
-
The Application Events Framework
- Monitoring Creation and Destruction of the Servlet Context
- Example: Initializing Commonly Used Data
- Detecting Changes in Servlet Context Attributes
- Example: Monitoring Changes to Commonly Used Data
- Packaging Listeners with Tag Libraries
- Example: Packaging the Company Name Listeners
- Recognizing Session Creation and Destruction
- Example: A Listener That Counts Sessions
- Watching for Changes in Session Attributes
- Example: Monitoring Yacht Orders
- Using Multiple Cooperating Listeners
- The Complete Events Deployment Descriptor
-
Servlet and JSP Filters
-
New Tag Library Capabilities
-
New Tag Library Features in JSP 1.2
- Using the New Tag Library Descriptor Format
- Bundling Listeners with Tag Libraries
- Checking Syntax with TagLibraryValidator
- Aside: Parsing XML with SAX 2.0
- Handling Exceptions with the TryCatchFinally Interface
- New Names for Return Values
- Looping Without Generating BodyContent
- Introducing Scripting Variables in the TLD File
- The JSP Standard Tag Library
-
New Tag Library Features in JSP 1.2
- Server Organization and Structure
Product information
- Title: More Servlets and JavaServer Pages™
- Author(s):
- Release date: December 2001
- Publisher(s): Pearson
- ISBN: 0130676144
You might also like
book
Core Servlets and JavaServer Pages™
Practical guide to using Java for Web-enabled applications and dynamic Web sites In-depth coverage of the …
book
Servlets and JavaServer Pages™: The J2EE™ Technology Web Tier
is the first complete guide to building dynamic Java-based Web applications using the new JavaServer Pages …
book
Java for the Web with Servlets, JSP, and EJB: A Developer’s Guide to J2EE Solutions
Java for Web with Servlets, JSP and EJB is the one book you need to master …
book
Beginning JSP, JSF and Tomcat: Java Web Development
Start building Java-based web applications now, even if you're a complete newcomer to Java. Comprehensive and …