File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes don't understand Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "don Watch "don New topic

don't understand "forEach" tag's attribute "items"

Charles Roos

Joined: Dec 14, 2012
Posts: 5
I'm working with a jspfile which outputs data to web page, but i don't understand were the data is magically taken.
The code is such:

Where is "pagingHolder.myQueryResults" defined? It seems to be a dataset, but i don't understand where is the location where this dataset is filled?
The JSP-code as you see don't import any "pagingHolder" module. Maybe in some kind of xml-file there is a connection that says that global variable "pagingHolder" refers to a Java class?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Charles Roos wrote:

JSTL_core ? from which tld are you getting it?

Coming to your question : (look for Iterator Tags)
Charles Roos

Joined: Dec 14, 2012
Posts: 5
Seetharaman Venkatasamy wrote:
Charles Roos wrote:
(look for Iterator Tags)

I looked, it looks like this there:

It does not explain where is defined thing called "sessionScope.cart.items" and how it is filled with data.
I think i better go through entire J2EE tutorial to get answer to myself.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

It is most likely established by the page controller.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: don't understand "forEach" tag's attribute "items"
It's not a secret anymore!