bean:page

 < Day Day Up > 



<bean:page />

The <bean:page /> tag is used to retrieve the value of an identified implicit JSP object, which it stores in the page context of the current JSP. The retrieved object will be stored in the page scoped scripting variable named by the id attribute. The <bean:page /> tag has no body and supports two attributes, as shown in Table 20.6.

Table 20.6: <bean:page /> Tag Attributes

Attribute

Description

id

Identifies the name of the scripting variable that is being made available with the value of the specified page context property. (Required)

property

Specifies the implicit object being retrieved from the current page context. The property attribute must be set to one of these implicit object values: application, config, request, response, or session. (Required)

This code snippet contains a simple example of using the <bean:page /> tag:

 <bean:page  property="session"/> 

In this example, we are retrieving the implicit session object and storing this reference in the scripting variable sessionVar.



 < Day Day Up > 



Professional Jakarta Struts
Professional Jakarta Struts (Programmer to Programmer)
ISBN: 0764544373
EAN: 2147483647
Year: 2003
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net