You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Silva, Alejandro" <Al...@Honeywell.com> on 2002/08/20 20:29:40 UTC

Cannot create iterator (newbie)

Hi!

Intro:

First of all, I'm new to Struts :) Well, I'm running Struts with Tomcat 3.2.4. I have a Vector as part of an ActionForm
then I'm sending this ActionForm to a JSP file and trying to use the Vector to create a "select" element using the
<html:select> and <html:options>. But, (there is always a "but") I'm getting a "Cannot create iterator..." message :(

Comments? Suggestions?

Details:

I have an Action called GetSBUListAction, which fills a Vector (SbuList) with instances of a bean called SBU like this:

  SbuList = Sbu.getList (slLogin);

added the Vector to an ActionForm called SBUListForm:

  SBUListForm SbuListForm = new SBUListForm ();
  SbuListForm.setSbuList (SbuList);

then I added this Vector to the request as an attribute:

  request.setAttribute ("SBUList", SbuListForm);

Everything goes Ok, so far.

Meanwhile, in the JSP world... I'm using:

  <jsp:useBean id="SBUList" scope="request" type="com.honeywell.fadd.SBUListForm"/>

to get the List from the request and then I use:

    <html:select property="selectedSBU">
    <html:options collection="SBUList"
                           property="sbuID"
                   labelProperty="name"/>
    </html:select>

To try and make a select statement with its options. But when I try it, I get this ugly message:

Error: 500
Location: /fadd/new_asset_sbu.jsp
Internal Servlet Error:
javax.servlet.ServletException: Cannot create iterator for com.honeywell.fadd.SBUListForm@2ea710
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:461)
	at
_0002fnew_0005fasset_0005fsbu_0002ejspnew_0005fasset_0005fsbu_jsp_13._jspService(_0002fnew_0005fasset_0005fsbu_0002ejspn
ew_0005fasset_0005fsbu_jsp_13.java:399)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
.
.
.


Alejandro Silva
Honeywell - GBS Mexico
alejandro.silva@honeywell.com
+52 (444) 826-2577


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>