Sciweavers


Book

Core Servlets and JavaServer Pages

15 years 8 months ago
Core Servlets and JavaServer Pages
"Servlet and JSP technology has become the technology of choice for developing online stores, interactive Web applications, and other dynamic Web sites."
Marty Hall, Larry Brown
Added 16 Apr 2009
Updated 16 Apr 2009
Authors Marty Hall, Larry Brown
Chapter 1: An Overview of Servlet and JSP Technology
 
Understanding the role of servlets
Building Web pages dynamically
Looking at servlet code
Evaluating servlets vs. other technologies
Understanding the role of JSP
 
Chapter 2: Server Setup and Configuration
 
Installing and configuring Java
Downloading and setting up a server
Configuring your development environment
Testing your setup
Simplifying servlet and JSP deployment
Locating files in Tomcat, JRun, and Resin
Organizing projects into Web applications
 
Chapter 3: Servlet Basics
 
The basic structure of servlets
A simple servlet that generates plain text
A servlet that generates HTML
Servlets and packages
Some utilities that help build HTML
The servlet life cycle
How to deal with multithreading problems
Tools for interactively talking to servlets
Servlet debugging strategies
 
Chapter 4: Handling the Client Request: Form Data
 
Reading individual request parameters
Reading the entire set of request parameters
Handling missing and malformed data
Filtering special characters out of the request parameters
Automatically filling in a data object with request parameter values
Dealing with incomplete form submissions
 
Chapter 5: Handling the Client Request: HTTP Request Headers
 
Reading HTTP request headers
Building a table of all the request headers
Understanding the various request headers
Reducing download times by compressing pages
Differentiating among types of browsers
Customizing pages according to how users got there
Accessing the standard CGI variables
 
Chapter 6: Generating the Server Response: HTTP Status Codes
 
Format of the HTTP response
How to set status codes
What the status codes are good for
Shortcut methods for redirection and error pages
A servlet that redirects users to browser-specific pages
A front end to various search engines
 
Chapter 7: Generating the Server Response: HTTP Response Headers
 
Format of the HTTP response
Setting response headers
Understanding what response headers are good for
Building Excel spread sheets
Generating JPEG images dynamically
Sending incremental updates to the browser
 
Chapter 8: Handling Cookies
 
Understanding the benefits and drawbacks of cookies
Sending outgoing cookies
Receiving incoming cookies
Tracking repeat visitors
Specifying cookie attributes
Differentiating between session cookies and persistent cookies
Simplifying cookie usage with utility classes
Modifying cookie values
Remembering user preferences
 
Chapter 9: Session Tracking
 
Implementing session tracking from scratch
Using basic session tracking
Understanding the session-tracking API
Differentiating between server and browser sessions
Encoding URLs
Storing immutable objects vs. storing mutable objects
Tracking user access counts
Accumulating user purchases
Implementing a shopping cart
Building an online store
 
Chapter 10: Overview of JSP Technology
 
Understanding the need for JSP
Evaluating the benefits of JSP
Comparing JSP to other technologies
Avoiding JSP misconceptions
Installing JSP pages
Surveying JSP syntax
 
Chapter 11: Invoking Java Code with JSP Scripting Elements
 
Static vs. dynamic text
Dynamic code and good JSP design
The importance of packages for JSP helper/utility classes
JSP expressions
JSP scriptlets
JSP declarations
Servlet code resulting from JSP scripting elements
Scriptlets and conditional text
Predefined variables
Servlets vs. JSP pages for similar tasks
 
Chapter 12: Controlling the Structure of Generated Servlets: the JSP page Directive
 
Understanding the purpose of the page directive
Designating which classes are imported
Specifying the MIME type of the page
Generating Excel spreadsheets
Participating in sessions
Setting the size and behavior of the output buffer
Designating pages to handle JSP errors
Controlling threading behavior
 
Chapter 13: Including Files and Applets in JSP Pages
 
Using jsp:include to include pages at request time
Using <%@ include ... %> ( the include directive) to include files at page translation time
Understanding why jsp:include is usually better than the include directive
Using jsp:plugin to include applets for the Java Plug-in
 
Chapter 14: Using JavaBeans Components in JSP Documents
 
Understanding the benefits of beans
Creating beans
Installing bean classes on your server
Accessing bean properties
Explicitly setting bean properties
Automatically setting bean properties from request parameters
Sharing beans among multiple servlets and JSP pages
 
Chapter 15: Integrating Servlets and JSP: The Model View Controller (MVC) Architecture
 
Tutorial on JSF (JavaServer Faces) and Apache MyFaces (an MVC Framework)
Tutorial on Jakarta Struts (another MVC Framework)
Topics in Chapter:
 
Understanding the benefits of MVC
Using RequestDispatcher to implement MVC
Forwarding requests from servlets to JSP pages
Handling relative URLs
Choosing among different display options
Comparing data-sharing strategies
Forwarding requests from JSP pages
Including pages instead of forwarding to them
 
Chapter 16: Simplifying Access to Java Code: The JSP 2.0 Expression Language
 
Motivating use of the expression language
Invoking the expression language
Disabling the expression language
Preventing the use of classic scripting elements
Understanding the relationship of the expression language to the MVC architecture
Referencing scoped variables
Accessing bean properties, array elements, List elements, and Map entries
Using expression language operators
Evaluating expressions conditionally
 
Chapter 17: Accessing Databases with JDBC
 
Connecting to databases: the seven basic steps
Simplifying JDBC usage: some utilities
Using precompiled (parameterized) queries
Creating and executing stored procedures
Updating data through transactions
Using JDO and other object-to-relational mappings
 
Chapter 18: Configuring MS Access, MySQL, and Oracle
 
Configuring a DSN to connect to Microsoft Access
Installing and configuring MySQL
Creating databases and users in MySQL
Installing and configuring Oracle9i
Using the Database Configuration Assistant to create a database in Oracle9i
Manually creating a database in Oracle9i
Creating users in Oracle9i
Testing your database through a JDBC connection
Determining the JDBC version of your database driver
Setting up the example music table
 
Chapter 19: Creating and Processing HTML Forms
 
Data submission from forms
Text controls
Push buttons
Check boxes and radio buttons
Combo boxes and list boxes
File upload controls
Server-side image maps
Hidden fields
Groups of controls
Tab ordering
A Web server for debugging forms
More Information
 
Online documentation
 
Servlet 2.4 API
JSP 2.0 API
Java 1.4 API
Java 1.5 API
Struts Developer and User Guides
Struts API
JSF 1.1 Java API
JSF 1.1 Tag Library API
Apache MyFaces Documentation
 
Comments (0)