struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <strut...@reumann.net>
Subject Re: [OT] how to test user role in jsp
Date Tue, 03 May 2005 15:39:42 GMT
G√ľnther Wieser wrote the following on 5/3/2005 10:44 AM:
> 
> i would like to display a link depending if a user is in a certain role. is
> there a test i could use in <c:if test=${...}> or anything else i could use
> as a tag to do this? do i need to implement this on my own?

I like the Struts logic present tag for this:

<logic:present 
role="${UICONSTANTS.ROLE_HELP_LINE},${UICONSTANTS.ROLE_PR_ADM}">
....
</logic:present>

JSTL has one also but, as far as I know, it doesn't check for multiple 
roles like the logic:present one does.

-- 
Rick

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


Mime
View raw message