You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nikola Milutinovic <Ni...@ev.co.yu> on 2005/07/01 08:16:06 UTC

Re: iterate on a value

David Rickard wrote:

> If you don't mind mixing Struts and JSTL, use a <c:forEach> loop, with 
> the "end" value being the "number of children" parameters;
>
> At 11:00 AM 6/30/2005, Dewitte Rémi wrote:
>
>> Hello !
>> In my form , i ask the number of children. On the next page, i'd like to
>> display as many textboxes as children to get their name.
>> <logic:iterate> provides iteration on array or collection, how can i 
>> iterate
>> on the number of children ?
>

A word of caution on mixing Struts and JSTL - there are situation when 
it breaks. I've had a webapp, using Struts 1.1 and JSTL 1.0 (Jakarta 
JSTL) and the application did not want to deploy at all. When removed 
JSTL, it ran just fine.

As for the original question, well, the Action class in between those 
two requests can build an array for iteration. It is ugly, but it works.

Nix.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: iterate on a value

Posted by Dewitte Rémi <re...@gide.net>.
Thanks for your solutions.
Rémi

Le Vendredi 1 Juillet 2005 08:16, Nikola Milutinovic a écrit :
> David Rickard wrote:
> > If you don't mind mixing Struts and JSTL, use a <c:forEach> loop, with
> > the "end" value being the "number of children" parameters;
> >
> > At 11:00 AM 6/30/2005, Dewitte Rémi wrote:
> >> Hello !
> >> In my form , i ask the number of children. On the next page, i'd like to
> >> display as many textboxes as children to get their name.
> >> <logic:iterate> provides iteration on array or collection, how can i
> >> iterate
> >> on the number of children ?
>
> A word of caution on mixing Struts and JSTL - there are situation when
> it breaks. I've had a webapp, using Struts 1.1 and JSTL 1.0 (Jakarta
> JSTL) and the application did not want to deploy at all. When removed
> JSTL, it ran just fine.
>
> As for the original question, well, the Action class in between those
> two requests can build an array for iteration. It is ugly, but it works.
>
> Nix.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org