In our final example, the object should have been present in the session. If so, it is given the
local name wombat with
WombatType
. A
ClassCastException
may be raised if the
object is of the wrong class, and an
InstantiationException
may be raised if the
object is not defined.
2.13.1.1
Syntax
This action may or not have a body. If the action has no body, it is of the form:
typeSpec />
typeSpec ::=class= className |
class= className type= typeName |
type= typeName class= className |
beanName= beanName type= typeName |
type= typeName beanName= beanName |
type= typeName
If the action has a body, it is of the form:
typeSpec >
body
In this case, the body will be invoked if the Bean denoted by the action is created. Typically,
the
body
will contain either scriptlets or
jsp:setProperty
tags that will be used to
modify the newly created object, but the contents of the body is not restricted.
The
tag has the following attributes:
id
The name used to identify the object instance in the specified scope's
namespace,
and
also the scripting variable name declared and
initialized with that object reference. The name specified is case
sensitive and shall conform to the current scripting language variable
naming conventions.
scope
The scope within which the reference is available. The default value is
page
. See the description of the
scope
attribute defined earlier herein
63
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. |