tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Townsend" <>
Subject RE: xtags:ForEach question (involving parameters)
Date Fri, 13 Jul 2001 17:02:46 GMT
James.. thanks for the tip. As usual, I discovered my problem 15 minutes
after I posted to the list ;-) But, now I am trying something different
that doesn't seem to work. 

Here's the new select statement I am trying:

select = "//person[contains($field, $value)]"

Where field and value are parameters from the query string. $value seems
to work just fine, but the $field part doesn't. Does anyone have any
guidelines on what will and won't work when it comes to variable
substitution? The xtags documentation is alittle light in this area ;-)

John Townsend

-----Original Message-----
From: James Elson [] 
Sent: Friday, July 13, 2001 3:33 AM
To:; John Townsend
Subject: Re: xtags:ForEach question (involving parameters)

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
> work, but it didn't seem to work.

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

<xtags:forEach select =



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.

View raw message