wood burning stoves*
The moose likes JSP and the fly likes scope of EL function return values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "scope of EL function return values" Watch "scope of EL function return values" New topic
Author

scope of EL function return values

Yan Zhou
Ranch Hand

Joined: Sep 02, 2003
Posts: 136
Hi there,

With the following JSP code, once I make the selection and submit the form, I suppose there is only one object in the request scope, "selection".

I wonder under which scope does the return value of EL function, my:getItems() reside, is that page scope? In other words, the page scope will contain a list of item objects?

Thanks.
Yan

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

The return value of your EL function is intrinsically stored nowhere. In this example, since you are using it as the items value of a forEach tag, its consecutive elements will be stored in page scope using the name item only within the body of the forEach tag.

The elements will not be available outside the forEach body, and the return value of the function itself is never stored in any scope.
[ October 27, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scope of EL function return values
 
Similar Threads
Dropdown populates other fields
Element Shift Problem in Dynamic Form
How to Validate more then one selection list?
Problem With Using c: Tag to Display Drop-Down Menu
Instantiate object without scriptlet