tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Elson <Ja...@citria.com>
Subject Re: xtags:ForEach question (involving parameters)
Date Fri, 13 Jul 2001 10:33:13 GMT
John Townsend wrote:

>         <xtags:forEach select = "//person[child::name[contains(text(),
> '$param')]]">
>
> [...]
>
>
>
> Select = "//person[child::name[contains(text(), 'John')]]"
>
> Then it works. But, I would like to pass in the 'John' parameter from
> the URL. The URL would look something like this:
>
> http://localhost:8080/myapp/mypage.jsp?param=John
>
> Can I do this? I thought if I put $param in my select statement it would
> work, but it didn't seem to work.

I see you're putting the $param inside quotes. Try it without the string
delimiters:

<xtags:forEach select = "//person[child::name[contains(text(),$param)]]">

  James

_________________________________________________________________

If you are not the addressee of this confidential e-mail and any 
attachments, please delete it and inform the sender; unauthorised 
redistribution or publication is prohibited. 
Views expressed are those of the author and do not necessarily 
represent those of Citria Limited.
_________________________________________________________________

Mime
View raw message