In a scenario where a filter needs to restrict access based on user roles, which object or method is essential for implementing this?

  • filterConfig.getInitParameter("role")
  • request.getRoleParameter()
  • request.getUserRole()
  • request.isUserInRole()
To restrict access based on user roles, the request.isUserInRole() method is essential. It allows the filter to check whether the user associated with the request is in a particular security role.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *