I couldn't find a way in JSTL/EL using the standard tags. So it looks like we need a tag with that ability.
In that case it probably doesn't matter if you use the logic tag or the other suggestion of the request tag.


I see that the logic tag allows you to check for more than 1 role eg

<logic:present role="role1,role2,role3">

whereas the request tag does not, so there may be a benefit with still using the logic tag.

Zoran Avtarovski wrote:

I'm trying to find a way to use the isUserInRole method with the c:if tag.

I tried <c:if test="${pageContext.getRequest().isUserInRole("admin")}">

But you can't use the isUserInRole method as an expression. I'd rather not
have to cast the role into a page context string to test. Using the
logic:present tag is more preferable. I only ask because I get the feeling
that there's a move away from the struts tags and toward jstl.

How do others do it?

Zoran



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Jason Lea



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to