You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by TOMMY <to...@mail.bct.com.tw> on 2001/09/07 04:18:39 UTC

logic:iterate & JspException

Dear All 
I've got a question and seeking for answers. does anyone know what's wrong in the following code.

 

tommySelectForm
-------------------------------------------------------------------------------------   
  public Collection getUse_list(){
    
    
     ArrayList aa=new ArrayList();
     aa.add("AAA");
     aa.add("BBB");
     aa.add("CCC");
     
     return  aa;  
  }




tommy_Select.jsp
-------------------------------------------------------------------------------------  

<logic:iterate id="ddd" name="tommySelectForm" property="use_list">
 <TH>
      <A HREF="http://www.kimo.com.tw" ><bean:write name="ddd" /></A></br> 
 </TH>
 </logic:iterate>



struts-config.xml
-------------------------------------------------------------------------------------   
    <action    path="/tommy_select"
               type="tw.com.bct.online.tommy.TommySelectAction"
               name="tommySelectForm"
               scope="request"
               >
               <forward   name="success"              path="/tommy_Select.jsp"/>
    </action>




Exception
------------------------------------------------------------------------------------- 
Root cause of ServletException 
javax.servlet.jsp.JspException: Cannot find bean ddd in scope null


Thanks
Tommy