What is the role of `HttpServletRequest.isUserInRole()` in user authentication?
It checks if the authenticated user belongs to a specific role, which is useful for role-based access control in a web application.
Good! Youâ€™ve got it right. This method is crucial for enforcing role-based access control.
Can you explain how roles are typically defined and managed in a Java-based web application?