Which method can be used in servlets to programmatically enforce security constraints?

  • HttpServletRequest#isUserInRole()
  • doGet()
  • doPost()
  • init()
The HttpServletRequest#isUserInRole() method in servlets can be used to programmatically enforce security constraints by checking if the user associated with the request is in a specific role.
Add your answer
Loading...

Leave a comment

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