tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mfncoo...@gmail.com>
Subject Re: Looping with paramValues
Date Tue, 14 Sep 2004 18:57:54 GMT
On Tue, 14 Sep 2004 13:31:22 -0400, Kris Schneider <kris@dotech.com> wrote:
> Well, even if you could do it cleanly, there's no guarantee on the ordering of
> request parameters.

Although the Servlet spec doesn't state it explicitly, it does
actually specify that the order of values for a given parameter, as
returned by getParameterValues(), is the same as the order in which
they are submitted.

--
Martin Cooper


> Are you really just checking to see if a particular
> parameter has been passed? If so, you should be able to do that with just:
> 
> <c:if test="${param.nameOfTheParameter}">
>  ...
> </c:if>
> 
> Quoting Nic Werner <nic.werner@sonoma.edu>:
> 
> > Thanks everyone for the help. I ended up taking your examples, and just
> > 'on the side' iterating through the paramValues until I found the
> > matching one, and then setting a temp flag. Its unfortunate that I
> > couldn't just use an index to access the nth param and its nth value.
> >
> > - Nic.
> >
> > Helios Alonso wrote:
> >
> > > Oops.  Exactly.
> > >
> > > At 11:56 13/09/2004 -0400, you wrote:
> > >
> > >> Helios,
> > >>
> > >> Small correction (I think), did you mean ...
> > >> ><c:forEach var='entry' items='${params}'>
> > >> >   <c:if test="${entry.key == 'test1'>
> > >> >     <c:out value="${entry.value}"/>
> > >> >   </c:if>
> > >> ></c:forEach>
> > >> Note: I switched var and items values.
> 
> -- 
> Kris Schneider <mailto:kris@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message