Documentation Home
> Sun Java System Web Server 6.1 SP12 Programmer's Guide to Web Applications
Sun Java System Web Server 6.1 SP12 Programmer's Guide to Web Applications
Book Information
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
Preface
Chapter 1 Web Applications
Introducing Web Applications
Servlets
JSP
SHTML
CGI
Creating a Web Application
To create a web application
Securing a Web Application
Deploying a Web Application
Virtual Servers
Default Web Applications
Servlet and JSP Caching
Database Connection Pooling
Configuring the Web Container
Web Application Samples
Chapter 2 Using Servlets
About Servlets
Servlet Data Flow
To show the 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
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
Caching Servlet Results
Caching Features
Default Cache Configuration
Caching Example
CacheHelper Interface
CacheKeyGenerator Interface
Maximizing Servlet Performance
Chapter 3 Using JavaServer Pages
Introducing JSPs
Creating JSPs
Designing for Ease of Maintenance
Designing for Portability
Handling Exceptions
Compiling JSPs: The Command-Line Compiler
Package Names Generated by the JSP Compiler
Other JSP Configuration Parameters
Debugging JSPs
JSP Tag Libraries and Standard Portable Tags
JSP Cache Tags
cache
Attributes
Example
flush
Attributes
Examples
JSP Search Tags
<searchForm>
Function
Attributes
Usage
<CollElem>
Function
Attributes
Usage
<collection>
Function
Attributes
Usage
<colIItem>
Function
Attributes
Usage
<queryBox>
Function
Attributes
Usage
<submitButton>
Function
Attributes
Usage
<formAction>
Function
Attributes
Usage
<formSubmission>
Function
Attributes
Usage
<formActionMsg>
Function
Attributes
Usage
<Search>
Function
Attributes
Usage
<resultIteration>
Function
Attributes
<Item>
Function
Attributes
<resultStat>
Function
Attributes
<resultNav>
Function
Attributes
Chapter 4 Session Managers
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
Binding Notification with HttpSessionBindingListener
Invalidating a Session
Invalidating a Session Manually
Setting a Session Timeout
Session Managers
StandardManager
Enabling StandardManager
Manager Properties for StandardManager
PersistentManager
Enabling PersistentManager
Manager Properties for PersistentManager
IWSSessionManager
Enabling IWSSessionManager
Manager Properties for IWSSessionManager
Source Code for IWSSessionManager
MMapSessionManager (UNIX Only)
Enabling MMapSessionManager
Manager Properties for MMapSessionManager
Chapter 5 Securing Web Applications
Sun Java System Web Server Security Goals
Security Responsibilities Overview
Application Developer
Application Assembler
Application Deployer
Common Security Terminology
Authentication
Authorization
Realms
J2SE Application Role Mapping
Container Security
Programmatic Security
Declarative Security
Sun Java System Web Server-specific Security Features
Sun Java System Web Server Security Model
ACL-based Authentication and Authorization
J2SE/Servlet-based Authentication and Authorization
Web Application and URL Authorizations
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
Realm Configuration
File
LDAP
Solaris
Certificate
Custom Realm
Native Realm
Programmatic Login
Precautions
Granting Programmatic Login Permission
The ProgrammaticLogin Class
Enabling the Java Security Manager
The server.policy File
Default Permissions
Changing Permissions for an Application
For More Information
Chapter 6 Deploying Web Applications
Web Application Structure
Creating Web Deployment Descriptors
Deploying Web Applications
Using the Administration Interface
To deploy web applications using the administration interface
Deploying a Web Application using wdeploy
Using Sun Java Studio
Enabling and Disabling Web Applications
Using the Administration Interface
To enable or disable a deployed web application using the administrator interface
Editing the server.xml File
Dynamic Reloading of Web Applications
To load new servlet files or reload deployment descriptor changes
Classloaders
The sun-web-app_2_3-1.dtd File
Subelements
Data
Attributes
Elements in the sun-web.xml File
General Elements
sun-web-app
Subelements
Attributes
Properties
property
Subelements
Attributes
description
Subelements
Attributes
Security Elements
security-role-mapping
Subelements
Attributes
servlet
Subelements
Attributes
servlet-name
Subelements
Attributes
role-name
Subelements
Attributes
principal-name
Subelements
Attributes
group-name
Subelements
Attributes
Session Elements
session-config
Subelements
Attributes
session-manager
Subelements
Attributes
manager-properties
Subelements
Attributes
Properties
store-properties
Subelements
Attributes
Properties
session-properties
Subelements
Attributes
Properties
cookie-properties
Subelements
Attributes
Properties
Reference Elements
resource-env-ref
Subelements
Attributes
resource-env-ref-name
Subelements
Attributes
resource-ref
Subelements
Attributes
res-ref-name
Subelements
Attributes
default-resource-principal
Subelements
Attributes
name
Subelements
Attributes
password
Subelements
Attributes
jndi-name
Subelements
Attributes
Caching Elements
cache
Subelements
Attributes
Properties
Cache Class Names
cache-helper
Subelements
Attributes
default-helper
Subelements
Attributes
Properties
cache-mapping
Subelements
Attributes
url-pattern
Subelements
Attributes
cache-helper-ref
Subelements
Attributes
timeout
Subelements
Attributes
refresh-field
Subelements
Attributes
http-method
Subelements
Attributes
key-field
Subelements
Attributes
constraint-field
Subelements
Attributes
value
Subelements
Attributes
Classloader Elements
class-loader
Subelements
Attributes
JSP Elements
jsp-config
Subelements
Attributes
Properties
Internationalization Elements
parameter-encoding
Subelements
Attributes
locale-charset-info
Subelements
Attributes
locale-charset-map
Attributes
Alphabetical List of sun-web.xml Elements
Sample Web Application XML Files
Sample web.xml File
Sample sun-web.xml File
Chapter 7 Debugging Web Applications
Enabling Debugging
Using the Administration Interface
To enable debugging
Editing the server.xml File
JPDA Options
Using Sun Java Studio for Debugging
To manually attach the IDE to a remote Web Server
Debugging JSPs
Generating a Stack Trace for Debugging
Logging
Using the Administration Interface
To change logging settings
Editing the server.xml File
Profiling
The HPROF Profiler
To use HPROF profiling on UNIX
The Optimizeit Profiler
Appendix A Internationalization Issues
Servlets
Servlet Request
Servlet Response
JSPs
Appendix B Migrating Legacy Servlets
JSP by Extension
Servlet by Extension of Servlet by Directory
Registered Servlets
Example
© 2010, Oracle Corporation and/or its affiliates