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


Try the request taglib from jakarta...

<%@ taglib uri="http://jakarta.apache.org/taglibs/request-1.0"; prefix="request"%>

<request:isUserInRole role="admin">
Do admin stuff
</request:isUserInRole>

Tim


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



Reply via email to