Nope - you're really invoking a method, not accessing a JavaBean property. An
alternative would be to do the test in a filter or servlet (or MVC framework
component) and set a scoped variable prior to forwading to the JSP:
request.setAttribute("isUserInRole",
Boolean.valueOf(request.isUserInRole("roleName")));
Then you could do something like this in your JSP:
<c:when test="${isUserInRole}">
...
</c:when>
Quoting "Balakrishnan, Vijay" <[EMAIL PROTECTED]>:
> Thanks.Is there a way to do it within core using
> ${pageContext.request.isUserInRole eq 'xxx'}
>
> Vijay
>
> -----Original Message-----
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 17, 2003 10:56 AM
> To: Tag Libraries Users List
> Subject: Re: test expression within test using jsp:expression <c:when
> test="<j sp:expression>request.isUserInRole
>
>
> <%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %>
> ...
> <c_rt:when test='<%= request.isUserInRole("roleName") %>'>
> ...
> </c_rt:when>
>
> Quoting "Balakrishnan, Vijay" <[EMAIL PROTECTED]>:
>
> > Hi,
> >
> > I want to test request.IsUserInRole within the test. How do i do that ?
> > Right now,it says that test must not contain the < character.
> >
> > Thanks,
> > Vijay
> >
> > <c:when test="<jsp:expression>request.isUserInRole("ServiceRequest
> > setPon")</jsp:expression>"> <div><input
> > type="text" maxlength="20" name="serviceRequest.pon" value="<c:out
> > value='${serviceRequest.pon}' />"></div>
> > <div><input type="text"
> > maxlength="20" name="serviceRequest.pon" value="<c:out
> > value='${serviceRequest.pon}' />"></div>
> > </c:when>
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech <http://www.dotech.com/>
--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]