Hi again,

I have seen a bug in the bugzilla archive for Bug report for Struts
[2001/09/04] the bug report says :
2046|Opn|Enh|2001-06-07|a struts tag within another struts tag,

as I am using a struts tag within another struts, that is logic:iterate
within another logic:iterate could this be the problem.

Any help would be higly appreciated.....

regds,

David

-----Original Message-----
From: Chalissary, David 
Sent: 18 January 2002 10:32
To: [EMAIL PROTECTED]
Subject: problems while iterating through an iterator
using<logic:iterate>


Hi,

I am having a problem while using <logic:iterate>, I am using a logic
iterate
within another logic:iterate. It retrieves the first list which is an
ArrayList
and within this array list there is a String array of information which
needs to be 
displayed. The problem occurs while iterating through the second list,
the jsp 
exception says it cannot find the id of the second iterator before
iterating, 
but just after the exception, it prints the contents of the second
array.
I used the bean write to print out the contents of first logic iterate
and its fine, the error occurs before the second array of information is
printed.

I havent got a clue what could be the cause of this error....has anyone
encountered 
such a problem. I have included the code here :

<logic:iterate id="resultArray" name="SearchForm" property="resultList"
                      type="ResultArray">
              <bean:write name="resultArray"/>            
                <tr>
                      <logic:iterate id="finalResult" name="resultArray"
property="result"  
                                     type="java.lang.String"
scope="page">
                          <bean:define id="valueBeanResult"
name="finalResult" />
                      <td>
                          <bean:write name="valueBeanResult"/> 
                      </td>                    
                      </logic:iterate>  
                      <td>
                        <a
href="SearchResultAction.do?action=<bean:write name="forwardBean"
%>&objectId=<bean:write name="resultID"/>" ><bean:write
name="resultID"/></a> 
                     </td>
                </tr>
         </logic:iterate>

and the exception generated is as given below  :

javax.servlet.jsp.JspException: Cannot find bean finalResult in scope
null 
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:493) 
at
org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:200) 
at /SearchResult.jsp._jspService(/SearchResult.jsp.java:444) (JSP page
line 130) 
at com.orionserver[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54) 
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5459) 
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.JSPServlet.service(JSPServlet.java:31) 
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatch
er.java:508) 
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletReques
tDispatcher.java:177) 
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.forward(ServletRequestDispatc
her.java:148) 
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServle
t.java:1758) 
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) 
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) 

regds,

David





--
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