You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Lindholm, Greg" <gl...@neom.com> on 2005/06/30 20:00:25 UTC

RE: [OT] check role - isUserInRole in jstl

I've used the Jakarta taglibs-request tags to do this.
 
<%@ taglib uri="http://jakarta.apache.org/taglibs/request-1.0"
prefix="req" %>

<req:isUserInRole role="super">
    	<c:set var='userIsSuper' scope='session' value='true' />
</req:isUserInRole>


-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Grzegorz Stasica
Sent: Thursday, June 30, 2005 12:48 PM
To: user@struts.apache.org
Subject: check role - isUserInRole in jstl

I've a code like that
<c:if test="${request.isUserInRole('aa')}">
</c:if>

but I get an error that namespace has to be specified.
IsUserInRole is a function so probably I invoke it incorectlly.
How can I check user's role in jstl?


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


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


Re: [OT] check role - isUserInRole in jstl

Posted by Grzegorz Stasica <gs...@poczta.onet.pl>.
ok, but is not jstl solution?

Laurie Harper wrote:
> See also the standard Struts logic tags, particularly logic:present:
> 
> http://struts.apache.org/userGuide/struts-logic.html#present
> 
> L.
> 
> Lindholm, Greg wrote:
> 
>> I've used the Jakarta taglibs-request tags to do this.
>>  
>> <%@ taglib uri="http://jakarta.apache.org/taglibs/request-1.0"
>> prefix="req" %>
>>
>> <req:isUserInRole role="super">
>>         <c:set var='userIsSuper' scope='session' value='true' />
>> </req:isUserInRole>
>>
>>
>> -----Original Message-----
>> From: news [mailto:news@sea.gmane.org] On Behalf Of Grzegorz Stasica
>> Sent: Thursday, June 30, 2005 12:48 PM
>> To: user@struts.apache.org
>> Subject: check role - isUserInRole in jstl
>>
>> I've a code like that
>> <c:if test="${request.isUserInRole('aa')}">
>> </c:if>
>>
>> but I get an error that namespace has to be specified.
>> IsUserInRole is a function so probably I invoke it incorectlly.
>> How can I check user's role in jstl?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


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


Re: [OT] check role - isUserInRole in jstl

Posted by Laurie Harper <la...@holoweb.net>.
See also the standard Struts logic tags, particularly logic:present:

http://struts.apache.org/userGuide/struts-logic.html#present

L.

Lindholm, Greg wrote:

> I've used the Jakarta taglibs-request tags to do this.
>  
> <%@ taglib uri="http://jakarta.apache.org/taglibs/request-1.0"
> prefix="req" %>
> 
> <req:isUserInRole role="super">
>     	<c:set var='userIsSuper' scope='session' value='true' />
> </req:isUserInRole>
> 
> 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Grzegorz Stasica
> Sent: Thursday, June 30, 2005 12:48 PM
> To: user@struts.apache.org
> Subject: check role - isUserInRole in jstl
> 
> I've a code like that
> <c:if test="${request.isUserInRole('aa')}">
> </c:if>
> 
> but I get an error that namespace has to be specified.
> IsUserInRole is a function so probably I invoke it incorectlly.
> How can I check user's role in jstl?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


-- 
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/~laurie/


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