try this:

<snip>
    <logic:iterate id="testArray" name="spgLooperForm">
       Element is: <bean:write name="testArray"/>
     </logic:iterate>
</snip>

The name in the iterate tag should match exactly what you use in your config
file..

Also, since your array holds Strings, you don't need to include a
property="" on your <bean:write...>.. This would normally represent the
getXXX method you want to be called on the individual elements of the array.

that's my best guess without being able to compile and test it myself ;)

-ET


> -----Original Message-----
> From: Jason Vinson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 06, 2003 2:00 PM
> To: Struts Users Mailing List
> Subject: Re: Re: RE: noob question - iteration of a table
> 
> 
> 
> >Is this inside a form element that has the ActionForm 
> spgLooper associated with it?
> 
> such as:
> <html:form property="spgLooper" action="/jsp/spgLooper.do">
> 
> if so, then yes.
> 
> > Is spgLooper called spgLooper in your form declarations of 
> your struts-config.xml?
> 
> under the form-bean declarations:
>     <!-- looper form bean -->
>     <form-bean      name="spgLooperForm"
>                     type="spgLooperForm"/>
> 
> and in the action-mapping section:
>     <!-- spgLooper action -->
>     <action    path="/jsp/spgLooper"
>                type="spgLooperAction"
>                name="spgLooperForm"
>                input="/jsp/spgLooper.jsp"
>                scope="request">
>     <forward name="success" path="/jsp/spgHome.jsp" />
>     <forward name="failure" path="/jsp/spgLooper.jsp" />
>     </action>
> 
> what am i overlooking?
> Jason
> 
> 
> 
> 
> Michael Lee
> 
> ----- Original Message -----
> From: "Jason Vinson" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, February 06, 2003 11:48 AM
> Subject: Re: RE: noob question - iteration of a table
> 
> 
> > Here's what i have done so far (which isn't working):
> >
> > ActionForm class spgLooperForm.java:
> >
> > <snip>
> >   /* array of elements */
> >   private String[] testArray = {"foo", "boo", "noo", "goo"};
> >
> >   public String[] getTestArray() {
> >     return (this.testArray);
> >   }
> >   public void setTestArray(String[] testArray) {
> >     this.testArray=testArray;
> >   }
> > </snip>
> >
> > JSP spgLooper.jsp:
> >
> > <snip>
> >     <logic:iterate id="testArray" name="spgLooper">
> >       Element is: <bean:write name="testArray" property="value"/>
> >     </logic:iterate>
> > </snip>
> >
> > And my output is:
> >
> > <snip>
> > javax.servlet.jsp.JspException: Cannot find bean spgLooper 
> in any scope
> >     at 
> org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:839)
> >     at
> org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTa
> g.java:300)
> >     at 
> jsp_servlet._jsp.__spgLooper._jspService(__spgLooper.java:168)
> >     at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> >    
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :120)
> >    
> at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(Ser
> vletContextImp
> l.java:922)
> > </snip>
> >
> > any pointers would be GREATLY appreciated.
> >
> > TIA,
> > Jason
> >
> >
> > -------Original Message-------
> > From: Jarnot Voytek Contr AU HQ/SC <[EMAIL PROTECTED]>
> > Sent: 02/06/03 02:25 PM
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: RE: noob question - iteration of a table
> >
> > >
> > > You're under the right impression.
> >
> > Have you looked at:
> > 
> http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate ?
> >
> > --
> > Voytek Jarnot
> > Quidquid latine dictum sit, altum viditur.
> >
> >
> > > -----Original Message-----
> > > From: Jason Vinson [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, February 06, 2003 1:15 PM
> > > To: Struts Users Mailing List
> > > Subject: noob question - iteration of a table
> > >
> > >
> > > I am relatively new to struts (using 1.1b3), and I am trying
> > > to figure out how to iterate a group of tr & td's.  I am
> > > under the impression that i can setup all my data in the
> > > action form and use a special taglib to iterate a table in my
> > > jsp file, but I have no idea how to do it.  Can anyone steer
> > > me in the right direction?
> > >
> > > TIA,
> > > Jason
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to