Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Application Server 7 Developer's Guide to Web Applications

Contents


About This Guide
Who Should Use This Guide
Using the Documentation
How This Guide Is Organized
Documentation Conventions
General Conventions
Conventions Referring to Directories
Related Information
Product Support

Chapter 1   Web Applications
Introducing Web Applications
Servlets
JavaServer Pages
SHTML
CGI
Creating a Web Application
Deploying a Web Application
Debugging a Web Application
Internationalization Issues
The Server
Servlets
Servlet Request
Servlet Response
JSPs
Virtual Servers
Using the Administration Interface
Editing the server.xml File
Default Web Modules
Servlet and JSP Caching
Database Connection Pooling
Configuring the Web Container
Web Application Examples

Chapter 2   Using Servlets
About Servlets
Servlet Data Flow
Servlet Types
Creating Servlets
Creating the Class Declaration
Overriding Methods
Overriding Initialize
Overriding Destroy
Overriding Service, Get, and Post
Accessing Parameters and Storing Data
Handling Sessions and Security
Accessing Business Logic Components
Handling Threading Issues
Delivering Client Results
Creating a Servlet Response Page
Creating a JSP Response Page
Invoking Servlets
Calling a Servlet with a URL
Calling a Servlet Programmatically
Servlet Output
Using the Administration Interface
Editing the server.xml File
Caching Servlet Results
Caching Features
Default Cache Configuration
Caching Example
CacheHelper Interface
CacheKeyGenerator Interface
About the Servlet Engine
Instantiating and Removing Servlets
Request Handling
Allocating Servlet Engine Resources

Chapter 3   Using JavaServer Pages
Introducing JSPs
Creating JSPs
Designing for Ease of Maintenance
Designing for Portability
Handling Exceptions
JSP Tag Libraries and Standard Portable Tags
JSP Caching
cache
flush
Compiling JSPs: The Command-Line Compiler
Debugging JSPs

Chapter 4   Creating and Managing User Sessions
Introducing Sessions
Sessions and Cookies
Sessions and URL Rewriting
Sessions and Security
How to Use Sessions
Creating or Accessing a Session
Examining Session Properties
Binding Data to a Session
Invalidating a Session
Session Managers
StandardManager
Enabling StandardManager
Manager Properties for StandardManager
PersistentManager
Enabling PersistentManager
Manager Properties for PersistentManager
Store Properties for PersistentManager

Chapter 5   Securing Web Applications
User Authentication by Servlets
HTTP Basic Authentication
SSL Mutual Authentication
Form-Based Login
User Authentication for Single Sign-on
User Authorization by Servlets
Defining Roles
Defining Servlet Authorization Constraints
Fetching the Client Certificate
Security for SHTML and CGI

Chapter 6   Assembling and Deploying Web Modules
Web Application Structure
Creating Web Deployment Descriptors
Deploying Web Applications
Using the Command Line
Using the Administration Interface
Using Sun ONE Studio
Dynamic Reloading of Web Applications
The sun-web-app_2_3-0.dtd File
Subelements
Data
Attributes
Elements in the sun-web.xml File
General Elements
sun-web-app
property
description
Security Elements
security-role-mapping
servlet
servlet-name
role-name
principal-name
group-name
Session Elements
session-config
session-manager
manager-properties
store-properties
session-properties
cookie-properties
Reference Elements
resource-env-ref
resource-env-ref-name
resource-ref
res-ref-name
default-resource-principal
name
password
ejb-ref
ejb-ref-name
jndi-name
Caching Elements
cache
cache-helper
default-helper
cache-mapping
url-pattern
cache-helper-ref
timeout
refresh-field
http-method
key-field
constraint-field
value
Classloader Elements
class-loader
JSP Elements
jsp-config
Internationalization Elements
locale-charset-info
locale-charset-map
parameter-encoding
Sample Web Module XML Files
Sample web.xml File
Sample sun-web.xml File

Chapter 7   Using Server-Parsed HTML
Server-Side HTML and J2EE Web Applications
Enabling Server-Side HTML
Using Server-Side HTML Commands
config
include
echo
fsize
flastmod
exec
Environment Variables in Server-Side HTML Commands
Embedding Servlets
Time Formats

Chapter 8   Using CGI
CGI and J2EE Web Applications
Enabling CGI
Specifying CGI Directories
Specifying CGI File Extensions
Creating Custom Execution Environments for CGI Programs (UNIX only)
Specifying a Unique CGI Directory and UNIX User and Group for a Virtual Server
Specifying a Chroot Directory for a Virtual Server
Adding CGI Programs to the Server
Setting the Priority of a CGI Program
Windows CGI Programs
Overview of Windows CGI Programs
Specifying a Windows CGI Directory
Specifying Windows CGI as a File Type
Shell CGI Programs for Windows
Overview of Shell CGI Programs for Windows
Specifying a Shell CGI Directory (Windows)
Specifying Shell CGI as a File Type (Windows)
The Query Handler
Perl CGI Programs
Global CGI Settings
CGI Variables

Index


Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.