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(_0002fClientList_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...








Reply via email to