If a servlet needs to log application-wide events, which object would be the best choice for retrieving the log file’s path?

  • HttpServletRequest
  • HttpServletResponse
  • ServletConfig
  • ServletContext
The ServletContext provides a way to retrieve information that is shared among servlets, making it suitable for obtaining the log file's path for application-wide event logging.
Add your answer
Loading...

Leave a comment

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