collection A runtime expression that evaluates to a collection (conforming to the requirements listed above) to be iterated over.(RT EXPR)  
id The name of a page scope JSP bean that will contain the current element of the collection on each iteration, if it is not null.(REQUIRED)  
indexId The name of a page scope JSP bean that will contain the current index of the collection on each iteration.
 
length The maximum number of entries (from the underlying collection) to be iterated through on this page. This can be either an integer that directly expresses the desired value, or the name of a JSP bean (in any scope) of type java.lang.Integer that defines the desired value. If not present, there will be no limit on the number of iterations performed.(RT EXPR)  
name The name of the JSP bean containing the collection to be iterated (if property is not specified), or the JSP bean whose property getter returns the collection to be iterated (if property is specified).(RT EXPR)  
offset The zero-relative index of the starting point at which entries from the underlying collection will be iterated through. This can be either an integer that directly expresses the desired value, or the name of a JSP bean (in any scope) of type java.lang.Integer that defines the desired value. If not present, zero is assumed (meaning that the collection will be iterated from the beginning.(RT EXPR)  
property Name of the property, of the JSP bean specified by name, whose getter returns the collection to be iterated.(RT EXPR)  
scope The bean scope within which to search for the bean named by the name property, or "any scope" if not specified.(RT EXPR)  
type Fully qualified Java class name of the element to be exposed through the JSP bean named from the id attribute. If not present, no type conversions will be performed. NOTE: The actual elements of the collection must be assignment-compatible with this class, or a request time ClassCastException will occur.(RT EXPR)  

解决方案 »

  1.   

    id代表你要在下面应用的的标号,比如你写的
    <bean:write name="currentint" property="type"/>
    这里的name就是你上面的ID
    <logic:iterate id="currentint" name="strutstest.welcomActionForm">
    这里的name代表你保存在生存周期里的bean名字,也就是用request.setAttribute("beanname")的beanname,你的错误是在生存周期里没有相应的bean
      

  2.   

    你的bean如果是你的actionForm的话,可以不用写name属性,默认就是,但必须包在
    <html:form ></html:form>之间
      

  3.   

    id是为了让下面的<bean:write>用,而name是FormBean类的名称,但必须在struts-config.xml中,声明,如
    <form-beans>
      <form-bean name="welcon" type="包名.FormBeanName"/>
    </form-beans>
    这样就可以<bean:iterate>中用name了.