I have the same problem. It doesn't look like the iterate tag creates the
bean declared with the id attribute.
--a
-----Original Message-----
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 1:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Tag Iterate !!!
Based on what you are showing in your email, everything looks OK. I don't
think the problem is with the iterate tag. The message
"javax.servlet.ServletException: Cannot find bean client in scope null"
would have to be coming from bean:write which is looking for a bean called
client. It's looking in all scopes (null just means you didn't specify a
scope), so you don't need to add a scope. The iterate tag should put a bean
in the page scope with the name client.
Are you sure that it is the bean:write tag inside the iterate tag that is
causing the error or is there something else on the JSP that you aren't
showing? Try removing the bean:write from the iterate tag and replacing it
with some html.
> -----Original Message-----
> From: Geoffrey Van Nuffelen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Tag Iterate !!!
>
>
> Hi Ash,
>
> Thanks for your help... But I have the same error with Client.
>
> Have you got a example of this tag method ???
>
> Geoffrey...
> ----- Original Message -----
> From: "A.Sharma" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 01, 2001 12:10 PM
> Subject: RE: Tag Iterate !!!
>
>
> >
> > hi
> > probably change the case of 'c' in client.
> > the class has Capiltal 'c' while in JSP you are accessing small 'c'.
> >
> > :)
> > ash
> >
> > -----Original Message-----
> > From: Geoffrey Van Nuffelen [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 01, 2001 3:24 PM
> > To: Struts-User (E-Mail)
> > Subject: Tag Iterate !!!
> >
> >
> > Hi all,
> >
> > I try to use the tag iterate (logic) but I can't. I haven't success.
> >
> > I am working on Windows NT with tomcat 3.2 and struts 1.0b-2.
> >
> > I try to pass an array of object ( a personnal client
> class). but when a
> try
> > to access a property I have this error :
> >
> > javax.servlet.ServletException: Cannot find bean client in
> scope null
> > at
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(
> PageContextImp
> > l.java:459)
> > at
> >
> _0002fClientList_0002ejspClientList_jsp_55._jspService(_0002fC
> lientList_0002
> > ejspClientList_jsp_55.java:214)
> >
> > What I have to ?? I have to specify a scope ???
> >
> > Here you are the code of the .jsp , java class wich put the
> parameter and
> > client.class.
> >
> > .jsp :
> > ----------------------------------------
> >
> > ...
> > <body bgcolor="white">
> >
> > <logic:iterate id="client" name="test" >
> > <bean:write name="client" property="pmclient"/>
> > </logic:iterate>
> >
> > </body>
> > ...
> >
> > Java class :
> > ----------------------------------------------------------
> >
> > Client test[] = clients.getClients();
> > servlet.log("nmclient from clients : " +
> test[i].getNmclient(), 1); //
> test
> > ... it's working
> >
> > HttpSession session = request.getSession();
> > session.setAttribute("test", test);
> >
> > return (mapping.findForward("success"));
> >
> >
> > Client class :
> > ----------------------------------------
> >
> > public class Client {
> > private String nmclient = "";
> > private String pmclient = "";
> > private long cdclient;
> >
> > public Client() {
> > }
> > public String getNmclient() {
> > return nmclient;
> > }
> > public void setNmclient(String newNmclient) {
> > nmclient = newNmclient;
> > }
> > public String getPmclient() {
> > return pmclient;
> > }
> > public void setPmclient(String newPmclient) {
> > pmclient = newPmclient;
> > }
> > public long getCdclient() {
> > return cdclient;
> > }
> > public void setCdclient(long newCdclient) {
> > cdclient = newCdclient;
> > }
> > }
> >
> >
> > Thanks in advance for your help.
> >
> > Geoffrey...
> >
> >
> >
> >
> >
> >
> >
> >
> >
>