You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by lixin chu <li...@yahoo.com> on 2004/07/19 18:27:59 UTC

how to check a 'set' variable in Struts tag/JSTL

hi,
how to check a 'set' variable using JSTL or Struts
tags ? 

for example, I have a variable called 'Roles' which is
a Set. In a JSP, I want to check if
'Admin'/'Guest'/'User' is in the Set. How do I do this
? Could not find a suitable tag to handle this.

thanks
li xin


		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


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


Re: how to check a 'set' variable in Struts tag/JSTL

Posted by Rick Reumann <st...@reumann.net>.
lixin chu wrote:

> for example, I have a variable called 'Roles' which is
> a Set. In a JSP, I want to check if
> 'Admin'/'Guest'/'User' is in the Set. How do I do this
> ? Could not find a suitable tag to handle this.

Unfortunately I haven't found a tag in JSTL or Struts that does this (I 
think there should be one in JSTL though - also a contains for Lists). 
My guess is there is probably a gneric one out there that someone 
created. If not, time to make one and share:)

-- 
Rick

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