Chapter 4 provides details for the case where the language attribute is
java
.
For example, the
action
defined later herein uses this mechanism in order to, possibly instantiate, and subsequently
expose the named JavaBeans component to a page at client request processing time.
For example:
<% {
// introduce a new block %>
...
<%
/*
* the tag above creates or obtains the Customer Bean
* reference, associates it with the name customer in the
* PageContext, and declares a Java programming language
* variable of the
* same name initialized to the object reference in this
* block's scope.
*/
%>
...
<%= customer.getName(); %>
...
<% }
// close the block
%>
<%
// the variable customer is out of scope now but
// the object is still valid (and accessible via pageContext)
%>
2.12.3
The
scope
Attribute
The
scope= page|request|session|application
attribute/value tuple is
associated with, and modifies the behavior of the
id
attribute described above (it has both
translation time and client request processing time semantics). In particular it describes the
namespace, the implicit lifecycle of the object reference associated with the
name
, and the
APIs used to access this association, as follows:
59
JavaServer Pages 1.1 Specification
November 30, 1999
JSP Web Hosting JavaServer Pages Specifications JSP Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |