Have you tried adding the following attribute and value to the iterate 
tag?...

scope="page"


Arron.

K Br wrote:

>pl help. i have been wracking my small brain over this
>for a few hours and i have no clew.
>
>i am using logic:iterate copybook style; yet, it throws the runtime exception:
>
>javax.servlet.ServletException: Cannot find bean currBook in scope null
>
>the iterate statement is:
><logic:iterate id="currBook" collection="<%= books %>">
>       Next book: <bean:write name="currBook" property="title"/>
>     </logic:iterate>
>     
>
>
>the complete source is:
>
>
><%@ page language="java" import="My.*"
> import="java.util.*" %>
><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="login" %>
>
><html:html locale="true">
>  <head>
><html:base />
><html:errors />
></head>
>
>  <body>
>   <% 
>My.Book[] books = new My.Book[4];
>books[0] = new Book("An Introduction to Algebra", 100);
>books[1] = new Book("JSP: An Advanced Course", 234);
>books[2] = new Book("JavaScript and JSP Pages", 333);
> System.out.println("Books = " + books);
>pageContext.setAttribute("books", books, PageContext.PAGE_SCOPE);
>
>   %>
>
>   <html:form method="GET" action="addBook.do">
>
>     <logic:iterate id="currBook" collection="<%= books %>">
>       Next book: <bean:write name="currBook" property="title"/>
>     </logic:iterate>
>     <html:submit/></td>
>   </html:form>
>   <p>
>  </body>
></html:html>
>
>
>
>
>
>--
>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]>

Reply via email to