[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    RE:  Re: [OT] check role - isUserInRole in jstl
From:       "Lindholm, Greg" <glindholm () neom ! com>
Date:       2005-06-30 20:23:39
Message-ID: E88EA3A826AECE41B06C0810E2673D3F0177D07E () FTMHOME ! neom ! com
[Download RAW message or body]

I'm not aware of a "pure" jstl solution.

What you coded is not jstl, it's java (almost).

	request.isUserInRole('aa')

JSTL does not allow you to call java methods (only getters and setters
with a
restricted syntax).

You can use plain JSP and inject java into your pages or you can 
use one of the suggested taglibs.
IMHO the taglibs are a better solution.


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

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


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic