Yes - I store some data in it and then want to use that data later in the page.
-----Original Message----- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 15:32 To: Struts Users Mailing List Subject: RE: logic:iterate question Dumb question: Is the object reference 'myObj' pointing at anything before set it to the name 'myObj'? That sounds confusing -- too many myObjs floating around. Suppose you had pageContext.setAttribute("myObj", foo, PageContext.PAGE_SCOPE); My question is whether 'foo' is set before this call. Sri > -----Original Message----- > From: Andy Kriger [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 3:24 PM > To: Struts Users Mailing List > Subject: logic:iterate question > > > I have a JSP. I have some scriplet code that defines an > object and then I want to iterate over that object, but I > keep getting an error that the object is not defined in the > page scope. Looking at the docs I don't understand what I'm > doing wrong. > > --- > > <% > pageContext.setAttribute("myObj", myObj, > PageContext.PAGE_SCOPE); %> > > <logic:iterate id="ele" name="myObj" property="records" scope="page"> > <!-- do stuff --> > </logic:iterate> > > --- > > myObj has a getRecords() method that returns the array i want > to iterate over > > When i load the page i get 'Cannot find bean myObj in scope > page' Any ideas? > > thx > andy > > > > -- > To unsubscribe, e-mail: > <mailto:struts-user-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>