RE: Iterating List
Tnx a lot for Daniel and Tommy -Ramadoss -Original Message- From: Tommy Holm - TELMORE [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 4:40 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: SV: Iterating List The latter method would be the correct ! You could for clarity write the type of the id="myString" which is the object you access in every iteration and it would be required for other custom objects /Tommy -Oprindelig meddelelse- Fra: Daniel Henrique Alves Lima [mailto:[EMAIL PROTECTED] Sendt: 10. marts 2004 06:21 Til: Struts Users Mailing List Emne: Re: Iterating List How about this ? Ramadoss Chinnakuzhandai wrote: >finally I got the following working.. > > > > > >-Ramadoss > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List
How about this ? Ramadoss Chinnakuzhandai wrote: finally I got the following working.. -Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Iterating List
finally I got the following working.. -Ramadoss -Original Message- From: Daniel Henrique Alves Lima [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 8:35 PM To: Struts Users Mailing List Subject: Re: Iterating List Try (http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate) and (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write). Look at mail archive (http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]). I think somebody has been sent a question like yours. I hope this helps you... Ramadoss Chinnakuzhandai wrote: >I need to iterate and display collection object "List" containing objects of type >"String" in my JSP, I know that if the collection is of type Array I can index and >get all the objects but is there anyway I can iterate this List object and disply >its String objects in my JSP(without having to convert the list to Array). > >Thanks for your help > >-Ramadoss > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List
Try (http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate) and (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write). Look at mail archive (http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]). I think somebody has been sent a question like yours. I hope this helps you... Ramadoss Chinnakuzhandai wrote: I need to iterate and display collection object "List" containing objects of type "String" in my JSP, I know that if the collection is of type Array I can index and get all the objects but is there anyway I can iterate this List object and disply its String objects in my JSP(without having to convert the list to Array). Thanks for your help -Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List of Lists
Are you saying you use the member tag just so you can look at the html and see that it is being output? Larry >>> [EMAIL PROTECTED] 10/31/03 1:34 AM >>> No matter what, just a sign for our debugging in Browser. >From: javen fang <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: Struts Users Mailing List <[EMAIL PROTECTED]> >Subject: Re: Iterating List of Lists >Date: Thu, 30 Oct 2003 23:03:35 -0800 (PST) > >Where is tag from??? > >Your own taglib? > >--- "Choopong C." <[EMAIL PROTECTED]> wrote: > > Try like this > > > > > > > name="organizations"> > > > > > > > property="title"/> > > > property="items"> > > > > - > property="title"/> > > > > > > > > > > > > > > > > > > > > >From: "Chris Gastin" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > <[EMAIL PROTECTED]> > > >To: "Struts Users Mailing List" > > <[EMAIL PROTECTED]> > > >Subject: Iterating List of Lists > > >Date: Thu, 30 Oct 2003 21:55:53 -0600 > > > > > >I have List of Lists of DataObjects. I want to > > iterate through that List of > > >Lists to get access to the Data Object, where I > > will print the values of > > >the > > >attributes on the data object. I have the outer > > loop working, but I don't > > >understand how to get the Data out of the list in > > the inner loop. > > > > > >This is my latest attempt: > > > > > > > scope="request"> > > > > collection="list"> > > > > name="data" property="word"/> - > > > > property="definition"/> > > > > > > > > > > > > > > > >- > > >To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > >For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > >_ > > Protect your PC - get McAfee.com VirusScan Online > > >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > > > >- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > >__ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List of Lists
No matter what, just a sign for our debugging in Browser. From: javen fang <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: Iterating List of Lists Date: Thu, 30 Oct 2003 23:03:35 -0800 (PST) Where is tag from??? Your own taglib? --- "Choopong C." <[EMAIL PROTECTED]> wrote: > Try like this > > > name="organizations"> > > > property="title"/> > property="items"> > >- property="title"/> > > > > > > > > > > >From: "Chris Gastin" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > >To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > >Subject: Iterating List of Lists > >Date: Thu, 30 Oct 2003 21:55:53 -0600 > > > >I have List of Lists of DataObjects. I want to > iterate through that List of > >Lists to get access to the Data Object, where I > will print the values of > >the > >attributes on the data object. I have the outer > loop working, but I don't > >understand how to get the Data out of the list in > the inner loop. > > > >This is my latest attempt: > > > > scope="request"> > > collection="list"> > > name="data" property="word"/> - > > property="definition"/> > > > > > > > > > >- > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > _ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List of Lists
Where is tag from??? Your own taglib? --- "Choopong C." <[EMAIL PROTECTED]> wrote: > Try like this > > > name="organizations"> > > >property="title"/> >property="items"> > > - property="title"/> > > > > > > > > > > >From: "Chris Gastin" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > >To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > >Subject: Iterating List of Lists > >Date: Thu, 30 Oct 2003 21:55:53 -0600 > > > >I have List of Lists of DataObjects. I want to > iterate through that List of > >Lists to get access to the Data Object, where I > will print the values of > >the > >attributes on the data object. I have the outer > loop working, but I don't > >understand how to get the Data out of the list in > the inner loop. > > > >This is my latest attempt: > > > > scope="request"> > > collection="list"> > > name="data" property="word"/> - > > property="definition"/> > > > > > > > > > >- > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > _ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List of Lists
Yea I already have a scenario like where it works, but I have List Object, which contains a List of Data Objects di3List is a List in the request scope, which is holding Lists of Data. If di3List is returning a List of Lists, how do I get access to the Data Objects HOT - The code above is giving the following error. I understand why I am getting this error, but how do I access the Data Objects in the inner list? javax.servlet.ServletException: Cannot create iterator for this collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:533) at org.apache.jsp.iterate_jsp._jspService(iterate_jsp.java:314) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 10) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 69) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces sor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:536) - Original Message - From: "Choopong C." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 30, 2003 10:03 PM
Re: Iterating List of Lists
Try like this - From: "Chris Gastin" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: Iterating List of Lists Date: Thu, 30 Oct 2003 21:55:53 -0600 I have List of Lists of DataObjects. I want to iterate through that List of Lists to get access to the Data Object, where I will print the values of the attributes on the data object. I have the outer loop working, but I don't understand how to get the Data out of the list in the inner loop. This is my latest attempt: - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List of Lists
From: "Chris Gastin" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: Iterating List of Lists Date: Thu, 30 Oct 2003 21:55:53 -0600 I have List of Lists of DataObjects. I want to iterate through that List of Lists to get access to the Data Object, where I will print the values of the attributes on the data object. I have the outer loop working, but I don't understand how to get the Data out of the list in the inner loop. This is my latest attempt: - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]