In just 24 lessons of one hour or less, you will be able to build dynamic Web sites using JavaServer Pages. Using a
straightforward, step-by-step approach, each lesson builds on the previous ones, enabling you to learn the
essentials of JavaServer Pages 2.0 from the ground up. The book includes Apache Tomcat, Sun's reference
implementation of JSP, so you can start developing applications immediately.
[ Team LiB ]
• Table of Contents
• Examples
Sams Teach Yourself JavaServer Pages™
2.0 with Apache Tomcat in 24 Hours
By
MarkWutka
,
AlanMoffet
,
KunalMittal
Publisher : Sams Publishing
Pub Date : December 04, 2003
ISBN : 0-672 -32597 -7
Pages : 512
[ Team LiB ]
[ Team LiB ]
• Table of Contents
• Examples
Sams Teach Yourself JavaServer Pages™
2.0 with Apache Tomcat in 24 Hours
By
MarkWutka
,
AlanMoffet
,
KunalMittal
Publisher : Sams Publishing
Pub Date : December 04, 2003
ISBN : 0-672 -32597 -7
Pages : 512
Copyright
About the Authors
Acknowledgments
We Want to Hear from You!
Introduction
Who Should Read This Book
How This Book Is Organized
In Every Hour
Conventions Used in This Book
Apache Tomcat
Hour1. Getting Started with JavaServer Pages
A "Hello World" JavaServer Page
Using the
<% %>
Tags in a JavaServer Page
Displaying a Value with
<%= %>
Inserting Comments
Declaring Methods and Variables with
<%! %>
Handling Multiple Threads in a JSP
Summary
Q&A
Workshop
Hour2. JavaServer Pages Behind the Scenes
Introducing Servlets
A "Hello World" Servlet
Using the
invoker
to Run a Servlet
Packaging, Deploying, and Running a Servlet
The Anatomy of a Servlet
Sending a Response to the Browser
The
HttpServlet
Class
Choosing Between JavaServer Pages and Servlets
Summary
Q&A
Workshop
Hour3. Creating HTML Forms
A Simple HTML Form
Using the
request
Object
Retrieving Form Variables in a Servlet
Different Ways to Do Forms
Summary
Q&A
Workshop
Hour4. How the Browser Interacts with the Server
The Hypertext Transfer Protocol
Common Request Headers
Common Response Headers
The HTTP
POST
Command
GET
Versus
POST
HTTPS: Secure HTTP
Summary
Q&A
Workshop
Hour5. JSP and Servlet Lifecycles
Servlet Lifecycle
JavaServer Page Lifecycle
Reloading Other Classes
Application Lifecycle Events
Summary
Q&A
Workshop
Hour6. Looking Under the Hood—Core Servlet Components
The
ServletRequest
Class
The
HttpServletRequest
Class
The
ServletContext
Class
The
ServletResponse
Class
The
HttpServletResponse
Class
The
ServletInputStream
Class
The
ServletOutputStream
Class
The
HttpSession
Class
The
Cookie
Class
Creating a New Cookie
Summary
Q&A
Workshop
Hour7. Servlet Filters
The Filter Interface
An Example Filter—JSP/Servlet Timings
An Example Filter—Session Logging
Summary
Q&A
Workshop
Hour8. Core JavaServer Page Components
Built-in JSP Objects
The
JspWriter
Class
Working with the
pageContext
Object
The
JspEngineInfo
Class
Summary
Q&A
Workshop
Hour9. JSP Directives
An Overview of JSP Directives
The
page
Directive
The
include
Directive
The
taglib
Directive
Summary
Q&A
Workshop
Hour10. Using JSP Standard Actions to Organize Your Web Application
Including Other Files
Forwarding to Another Page
Passing Java Objects Between JSPs and Servlets
Making Your Application More Modular
Using an Applet in Your Form
Summary
Q&A
Workshop
Hour11. Debugging and Error Handling
Why Debugging Is Tough
Compile Versus Runtime Errors
Using Log Files to Debug an Application
Using a Debugger
Error Handling
Summary
Q&A
Workshop
Hour12. Saving Data Between Requests
Storing Data in Hidden Form Variables
Storing Data in a
session
Object
How Sessions Work
Forcing a New Session
Handling Session Termination
Handling Sessions Without Cookies
Storing Application-Wide Data
Summary
Q&A
Workshop
Hour13. More About Saving Data
Using Sessions to Save Data in a Shopping Cart Application
Storing Data in a Cookie
Q&A
Workshop
Hour14. Interacting with JavaBeans
The
jsp:useBean
Action
A Bean-Based Web Application
Summary
Q&A
Workshop
Hour15. The JSP Expression Language
Basic Syntax
Variables
Literals and Operators
Implicit Objects
Functions
Q&A
Workshop
Hour16. Extending JSP with New Tags
"Hello World" Tag
Packaging and Installing a Tag
Conditionally Including the Body of a Custom Tag
Processing Body Content with a Custom Tag
Handling Exceptions
Accessing Tag Attributes
Using Dynamic Attributes
Adding Scripting Variables
The JSP 2.0
SimpleTag
Interface
Tag Files—Tag Extensions Without Java
Tag File Directives
Summary
Q&A
Workshop
Hour17. The JSP Standard Tag Library
Installing and Using JSTL
Core Tag Library
Functions
Q&A
Workshop
Hour18. Working with Databases and JSTL Database Actions
A Brief Overview of Databases
What Is SQL?
Getting Started with Cloudscape
What Is JDBC?
Using JDBC from JavaServer Pages and Servlets
JSTL SQL Tag Library
Summary
Q&A
Workshop
Hour19. Creating an XML Application
A "Hello World" XML Page
A Few Simple Rules for XML
Why Use XML with JSP and Servlets?
XML Tag Library
Summary
Q&A
Workshop
Hour20. Building Web Applications with JavaServer Pages and Servlets
Web Application Architecture
The Model 1 and Model 2 Architectures
Using Model-View-Controller in Your Web Applications
Calling Multiple Controllers and Views
Summary
Q&A
Workshop
Hour21. Using Struts and JavaServer Faces
An Overview of Struts
Setting Up Struts
An Overview of JavaServer Faces (JSF)
Summary
Q&A
Workshop
Hour22. Internationalization
Setting the Page Encoding
Detecting the Browser's Preferred Locale
Using Locale-Based Text Formatters
Using Resource Bundles in Web Pages
The Format Tag Library
Summary
Q&A
Workshop
Hour23. Security
Role -Based Security
BASIC
Authentication
Creating a Custom Login Form
Checking Security Roles Programmatically
Using Client Certificates for Authentication
Summary
Q&A
Workshop
Hour24. Performance
Buffering Pages to Improve Performance
Use Static Content Where Possible
Caching Objects to Reduce Setup Time
Choosing the Right Session Mechanism
Precompiling JSPs
Setting the JSP Reload Time
Simple Java Optimizations
Making JSPs and Servlets Thread-Safe
Using Thread Pools
Summary
Q&A
评论0