Morten Andersen wrote:
I want to use JSTL to check the role of the user (it can be one of many)
I'm new to JSTL so even the simplest things gives me problems:
I've set the role using request.setAttribute("role" , role);
This tag:
<c:out value="${role}"/>
Prints out the role fine
While the following statements are newer true:
<c:if test="${role}==editor">
The role is editor
</c:if>
<c:if test="${role}=='editor'">
The role is editor
</c:if>
Where do I go wrong?
test is wrong :-) It should be
test="${role eq 'editor'}
if you want to compare with strings or
test="${role eq editor}
if you have variable "editor" in page/request/session scope with value
you want to check against
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]