Sun ONE Application Server 7 Developer's Guide to Web Applications |
816-7150-10 |
Updated: October 04, 2002 |
ContentsWho Should Use This Guide
Using the Documentation
How This Guide Is Organized
Documentation Conventions
General Conventions
Related Information
Conventions Referring to Directories
Product Support
Introducing Web Applications
Servlets
Creating a Web Application
JavaServer Pages
SHTML
CGI
Deploying a Web Application
Debugging a Web Application
Internationalization Issues
The Server
Virtual Servers
Servlets
Servlet Request
JSPs
Servlet Response
Using the Administration Interface
Default Web Modules
Editing the server.xml File
Servlet and JSP Caching
Database Connection Pooling
Configuring the Web Container
Web Application Examples
About Servlets
Servlet Data Flow
Creating Servlets
Servlet Types
Creating the Class Declaration
Invoking Servlets
Overriding Methods
Overriding Initialize
Accessing Parameters and Storing Data
Overriding Destroy
Overriding Service, Get, and Post
Handling Sessions and Security
Accessing Business Logic Components
Handling Threading Issues
Delivering Client Results
Creating a Servlet Response Page
Creating a JSP Response Page
Calling a Servlet with a URL
Servlet Output
Calling a Servlet Programmatically
Using the Administration Interface
Caching Servlet Results
Editing the server.xml File
Caching Features
About the Servlet Engine
Default Cache Configuration
Caching Example
CacheHelper Interface
CacheKeyGenerator Interface
Instantiating and Removing Servlets
Request Handling
Allocating Servlet Engine Resources
Introducing JSPs
Creating JSPs
Designing for Ease of Maintenance
JSP Tag Libraries and Standard Portable Tags
Designing for Portability
Handling Exceptions
JSP Caching
cache
Compiling JSPs: The Command-Line Compiler
flush
Debugging JSPs
Creating and Managing User Sessions
Introducing Sessions
Sessions and Cookies
How to Use Sessions
Sessions and URL Rewriting
Sessions and Security
Creating or Accessing a Session
Session Managers
Examining Session Properties
Binding Data to a Session
Invalidating a Session
StandardManager
Enabling StandardManager
PersistentManager
Manager Properties for StandardManager
Enabling PersistentManager
Manager Properties for PersistentManager
Store Properties for PersistentManager
User Authentication by Servlets
HTTP Basic Authentication
User Authentication for Single Sign-on
SSL Mutual Authentication
Form-Based Login
User Authorization by Servlets
Defining Roles
Fetching the Client Certificate
Defining Servlet Authorization Constraints
Security for SHTML and CGI
Assembling and Deploying Web Modules
Web Application Structure
Creating Web Deployment Descriptors
Deploying Web Applications
Using the Command Line
Dynamic Reloading of Web Applications
Using the Administration Interface
Using Sun ONE Studio
The sun-web-app_2_3-0.dtd File
Subelements
Elements in the sun-web.xml File
Data
Attributes
General Elements
Sample Web Module XML Files
sun-web-app
Security Elements
property
description
security-role-mapping
Session Elements
servlet
servlet-name
role-name
principal-name
group-name
session-config
Reference Elements
session-manager
manager-properties
store-properties
session-properties
cookie-properties
resource-env-ref
Caching Elements
resource-env-ref-name
resource-ref
res-ref-name
default-resource-principal
name
password
ejb-ref
ejb-ref-name
jndi-name
cache
Classloader Elements
cache-helper
default-helper
cache-mapping
url-pattern
cache-helper-ref
timeout
refresh-field
http-method
key-field
constraint-field
value
class-loader
JSP Elements
jsp-config
Internationalization Elements
locale-charset-info
locale-charset-map
parameter-encoding
Sample web.xml File
Sample sun-web.xml File
Server-Side HTML and J2EE Web Applications
Enabling Server-Side HTML
Using Server-Side HTML Commands
config
Embedding Servlets
include
echo
fsize
flastmod
exec
Environment Variables in Server-Side HTML Commands
Time Formats
CGI and J2EE Web Applications
Enabling CGI
Specifying CGI Directories
Creating Custom Execution Environments for CGI Programs (UNIX only)
Specifying CGI File Extensions
Specifying a Unique CGI Directory and UNIX User and Group for a Virtual Server
Adding CGI Programs to the Server
Specifying a Chroot Directory for a Virtual Server
Setting the Priority of a CGI Program
Windows CGI Programs
Overview of Windows CGI Programs
Shell CGI Programs for Windows
Specifying a Windows CGI Directory
Specifying Windows CGI as a File Type
Overview of Shell CGI Programs for Windows
The Query Handler
Specifying a Shell CGI Directory (Windows)
Specifying Shell CGI as a File Type (Windows)
Perl CGI Programs
Global CGI Settings
CGI Variables