Which method is used to get a reference to the ServletContext object?
- context()
- getServletConfig()
- getServletContext()
- initContext()
The method getServletContext() is used to obtain a reference to the ServletContext object within a servlet.
Loading...
Related Quiz
- To listen for events related to a specific attribute in a session, implement the interface ___________.
- Which HTTP method is idempotent and used primarily for retrieving data?
- Which HTTP status code is typically sent by an HTTP servlet to indicate a successful response?
- How does a filter pass the request and response to the next entity in the filter chain?
- The listener interface _________ is used to listen for request attribute changes.