There is no built-in in JSP or JSTL, but the request taglib from the Jakarta project provides isUserInRole. Install taglib and use the tag as follows:
<req:isUserInRole role="admin">
The remote user is in role "admin".
</req:isUserInRole>
<req:isUserInRole role="admin" value="false">
The remote user is not in role "admin".
</req:isUserInRole>
Sitse source
share