Sun Java System Application Server Platform Edition 9 Developer's Guide

Configuring Sessions

This section covers the following topics:

Sessions, Cookies, and URL Rewriting

To configure whether and how sessions use cookies and URL rewriting, edit the session-properties and cookie-properties elements in the sun-web.xml file for an individual web application. For more about the properties you can configure, see session-properties in Sun Java System Application Server Platform Edition 9 Application Deployment Guide and cookie-properties in Sun Java System Application Server Platform Edition 9 Application Deployment Guide.

For information about configuring default session properties for the entire web container, see Chapter 7, Java EE Containers, in Sun Java System Application Server Platform Edition 9 Administration Guide.

Coordinating Session Access

Make sure that multiple threads don’t simultaneously modify the same session object in conflicting ways.

This is especially likely to occur in web applications that use HTML frames where multiple servlets are executing simultaneously on behalf of the same client. A good solution is to ensure that one of the servlets modifies the session and the others have read-only access.