Chapter 24 JavaServer Pages


Objects and scopes

When a JSP page processes a request, it has access to a set of implicit objects, each of which is associated with a given scope. Other objects can be created in scripts. These created objects have a scope attribute that defines where the reference to that object is created and removed.

Scopes

There are four scopes:

References to the object are stored in the PageContext, Request, Session, or Application object, according to the object's scope.

Implicit objects

The following implicit objects are always available within scriptlets and expressions:

For information about the scope and type of each implicit object, see the JavaServer Pages Syntax Card http://java.sun.com/products/jsp/syntax.pdf .

The exception implicit object

If the JSP page is an error page (the page directive's isErrorPage attribute is set to true), the following implicit object is also available:

For more information, see "Error handling".

 


Copyright © 2000 Sybase, Inc. All rights reserved.